So I am creating a gallery using Lightbox2. I put all the images in "div class="container" then enter code here
I used CSS to add a border around the thumbnail of the photo. I gave it properties for static and when hovered over.
Here's the HTML I used to set up Lightbox2:
<a href="images/work/cardrawing.jpg" data-lightbox="drawing" title="subaru drawing"><img src="images/work/thumbnails/cardrawing_thumb.jpg" /></a>
It worked fine. I then added the following code to the bottom of the "lightbox.css" file to give it specific properties:
a img{border:5px solid #cccccc;} a:hover img{border:5px solid #0b6f8a;}
This also worked great, however, it affected all other images on my site that have an anchored link or anything. Almost every image in general. Whats the best way to categorize everything as to only affect certain images?
You should use ID's or classes. Have specific
img
tags set up so it's like:and then in your CSS you can use:
You can then set specific properties/hovers for each image if necessary.