Monday, February 20, 2006

IE 6, XHTML and the image space

OK IE 6 has a great little bug/feature where if you set your page type to XHTML and you put an image on the page let's say a logo in your header, most times you want your image to be flush with the bottom element, perhaps a border of the container div the image is in.  If you leave the image unprocessed then you'll run into the problem where a 1px space shows up under your image.  This is very frustrating when your looking for a clean layout.

I googled for an answer and either I wasn't searching right or there really isn't an answer on the topic but I couldn't find a solution to the problem.

Asked my friend Travis and he gave me the simple solution to this problem.

img
{
    display: block;
}

That's it.  This will butt everything up on all sides.

Saturday, August 02, 2008 7:25:30 AM (Eastern Daylight Time, UTC-04:00)
rrtqiycy http://jfokisek.com geiebekn nbexvoxv [URL=http://rgsdsomq.com]zqacefwa[/URL] altwahco
Name
E-mail
Home page

Comment (Some html is allowed: a@href@title, b, blockquote@cite, em, i, strike, strong, sub, super, u)  

Enter the code shown (prevents robots):

Blog Posts by:

Currently Viewable:

My Twitter Updates

View Twitter Page