About Blog

How to set container height to 1px in IE6

Category: IE6 Bugs

If you use clearfix class to clear floated elements throughout your site, you might have been faced with a large gap in IE6 browser, even if you specified 1px height property, like so:

.clearfix { clear:both; height:1px; }

There is a very simple solution for this problem - just add the line-height property.

.clearfix { clear:both; height:1px; line-height:1px; }

No Comments »

RSS feed for comments on this post. TrackBack URL

Leave a comment

XHTML: You can use these tags: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>