Posted By

CDIDevs on 12/31/09


fix hack empty margin ie6 height

Versions (?)

IE6 Empty Div Adds Margin - Fix

 / Published in: CSS


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 forums. The fix here is ultimately the "font-size:0" declaration. The rest are for good measure...

  1. div{font-size:0;line-height:0;margin:0;padding:0;}

Report this snippet  

You need to login to post a comment.