Return to Snippet

Revision: 13044
at April 6, 2009 10:34 by charmcitycoder


Initial Code
div{
font-size:0;
line-height:0;
margin:0;
padding:0;
}

Initial URL
http://www.webdeveloper.com/forum/showthread.php?t=66024

Initial Description
For instances where you have an empty div that is less than about 10-15px in height. IE assumes it should contain something and allots room for text.

I first found this on the webdeveloper.com forums.
The kicker here for me was the "font-size:0" declaration. Cheers!

Initial Title
IE6 Empty Div Adds Margin - Fix

Initial Tags
css, ie6

Initial Language
CSS