I'm having trouble with CSS and image galleries.
I want display an image with two borders - the first to be a solid line around the image, and the second to be another solid line roughly 30px away from the edges.
I started to tackle this problem by setting the padding around the image to 0 and the border to 1px solid. That get's my first border. Now here's the problem: I put the image inside a div tag, and set the padding of this div to 30px, border 1px solid. Instead of giving me a nice "frame" around my image, the div took the same width as its parent, and gave me a frame with too great a width. My images are of various sizes so I cannot simply set the width of my div tag.
What can I do to ensure that for any image, I get a nice frame of this nature?
Calum
I want display an image with two borders - the first to be a solid line around the image, and the second to be another solid line roughly 30px away from the edges.
I started to tackle this problem by setting the padding around the image to 0 and the border to 1px solid. That get's my first border. Now here's the problem: I put the image inside a div tag, and set the padding of this div to 30px, border 1px solid. Instead of giving me a nice "frame" around my image, the div took the same width as its parent, and gave me a frame with too great a width. My images are of various sizes so I cannot simply set the width of my div tag.
What can I do to ensure that for any image, I get a nice frame of this nature?
Calum