[thelist] whitespace below images

Mike Migurski mike-evolt at teczno.com
Wed Jul 9 02:20:14 CDT 2003


>Hi all! Well I've got a little bit of a white space problem that I just
>can't seem to get rid of. I'm trying to stick to 100% CSS but I can't
>find a way to fix the problem. Essentially there is about a 6px or so
>amount of white space below the images in HEADER, which I'm trying to get
>to align flush with the IMAGE div below it (which also has a whitespace
>problem of its own).

Gecko, right? This is because inline images have descenders, like the tail
of the letter 'y', due to the desire to have them aligned with text
baseline. You can usually counteract this problem by making your images
block elements, using something like the following with appropriate
context/class/id for your situation: img { display: block; }

Eric Meyer wrote a good in-depth article about this for netscape a while
back, still at <http://devedge.netscape.com/viewsource/2002/img-table/>
He suggests that the problem will be fixed with CSS3, but I have my doubts
about whether that will ever move out of the wouldn't-that-be-nice stage,
so I stick with block display for now.

---------------------------------------------------------------------
michal migurski- contact info and pgp key:
sf/ca            http://mike.teczno.com/contact.html



More information about the thelist mailing list