max-width in Internet Explorer

Skip Navigation LinksIrocon > Blog > 2006 > March, 2006 > March 22, 2006 > max-width in Internet Explorer

max-width in Internet Explorer

The key is using Internet Explorers relatively little known expression() property. Microsoft has their page on what they call "Dynamic properties". While being extremely useful in IE only environments, or to augment IE, it's a property I rarely see used.

For example:


#contentBody{
width:expression(document.body.clientWidth > 800? "800px": "auto" );

}
Last Updated:Thursday, September 02, 2010By:alferoSource#

Would you like to comment?

Sign in with your OpenID. If you do not know what OpenID is, find out.