Ricci Angela skrev:
        Following the late discussion about fluid/elastic layouts, I was wondered if 
somebody out there has some feedback concerning the use of Microsoft's "Dynamic 
properties" proprietary solution for fixing the lack of min/max-width support.
To use JScript inside CSS for IE works good, as long as scripting is enabled.

I do max-width in ems this way:
HTML (ignored by other browsers):

<!--[if lt IE 7]><span id="em">—</span><![endif]-->

CSS (served for IE only with conditional comments in the <head> section of the HTML):
#wrapper
{
width: 740px;
width:expression(
(document.getElementById("em").offsetWidth*59 <
document.body.clientWidth) ? "59.5em" : "auto"
);
}

The <span> should be inside the element you want to set max-with on (to make the width of the em-dash correct).

Live example:
http://www.forum-antroposofi.info/

Not tested with IE in quirks mode.

/AndersN
******************************************************
The discussion list for  http://webstandardsgroup.org/

See http://webstandardsgroup.org/mail/guidelines.cfm
for some hints on posting to the list & getting help
******************************************************

Reply via email to