[thelist] CSS <img> border problem

Chris Heilmann lists at onlinetools.org
Thu Feb 3 11:03:30 CST 2005

> Okay, the solution to this is probably so simple it hurts, but here
> goes...
> I'm trying to get a thumbnail image to display with a solid 1px border,
> but with 3px of padding between the image and the border. Here's the CSS:
> <style>
> .thumbnail {
>      padding: 3px;
>      border: 1px solid #660000;
> }
> </style>
> ...and the <img> tag code:
> <img src="image1.jpg" width="123" height="110" class="thumbnail" />

Are you sure your browser is in standards mode and not quirksmode?
It works with a valid doctype here:

Chris Heilmann
Blog: http://www.wait-till-i.com
Writing: http://icant.co.uk/
Binaries: http://www.onlinetools.org/

More information about the thelist mailing list