Friday, September 23, 2011

IE8 max-height bug

The CSS tag max-height can be useful to make your divs extend to the height of the page.
IE8 doesn't understand max-height. A workaround is this hack:
div {
max-height: 1000px;
<!--[if IE 8]>
max-height: none\9;
<![endif]-->
}
</style>

Sources: http://my.opera.com/dbloom/blog/2009/03/11/css-hack-for-ie8-standards-mode and http://www.sitepoint.com/forums/showthread.php?618830-IE8-Bug-I-need-to-fix

No comments:

Post a Comment

Post a Comment