[thelist] CSS Question

MRC webmaster at equilon-mrc.com
Thu Dec 6 09:59:31 CST 2001


Salvatore,

> > WIDTH: 100px;
> > WIDTH: expression(200);

    I'm surprised this got past me, but webfx is using IE-proprietary
dynamic styles [1]. I've used the setExpression() method [2] within script,
but have done only minimal testing, long ago, with the related expression()
method within a style sheet. By their own admission, webfx is actually using
the expression() method as a hack: the first, standard width style is
applied to most browsers, whereas IE 5 and above interpret the second width
style containing the expression, allowing webfx to more easily accommodate
browser inconsistencies.
    Despite their proprietary nature, IE expressions are actually pretty
handy, allowing you to create dynamic styles that automatically adjust to
changes within the browser, avoiding the need for more extensive scripting.
Some will decry the mixing of scripting within style sheets in this manner,
arguing that it is little different from mixing content and presentation in
HTML. I'm not sure that I agree, but am interested in the discussion if
there are any who feel strongly.

James Aylard

1.
http://msdn.microsoft.com/workshop/author/dhtml/overview/recalc.asp#Implemen
t
2.
http://msdn.microsoft.com/workshop/author/dhtml/reference/methods/setexpress
ion.asp





More information about the thelist mailing list