What is the best way to add a border to images within a column (div id)? I have vertical and horizontal images of different sizes.
I put each image in a .box class with the following CSS:
.box{ border: 3px; boder-color:#990000; }
but how can I get the box to scale according to the image size? Or am I just approaching this the wrong way? Seems like this should be easy, but I've tried a bunch of things...
Thank you, that worked! I feel like I am always posting typo's here. sorry...
Now the problem is the box is taking on the column's width. Is there a way to set the box to conform to the dimensions of the photos? Should I just choose my photo sizes and then make a special class for each size?
Do you mean that the boxes should be the same size regardless of the image? In that case it might be easier to put them inside an unordered list, for example, and add the borders and dimensions to the LI-items.
Well, I would like the border to conform to the size of the image- rather than the size of the box.
I could not figure out how to get a border around an image, so I put each image in a box. I'm not sure I really need to use the box. The image and it's box will both fit into the column, but my goal is to just put a border around each image.
Wozzabikes, Could you give me an example of of a definition rule? I tried adding a border properties to the image tag, but was unable to get any color except black.
hmmm...you know, if you want all the images to have a border around them, and they are inside a particular tag just target them, it will save you the class markup in your code. It works peachy too, with multiple images