Rainer Wagener wrote: > I use "!important" in print.styles quite frequently. e.g. "div { > float:none ! important; position:static ! important; }" is almost > mandatory in my print.styles.
I think that's because you organize your styles in such a way that you have to override a bunch of screen-style. Not a good approach IMO. Better keep styles for different media apart, so you can write minimal and exact styles for each media, without having to override anything. > Also !important is a good solution to override expressions and other > css rules applied via JavaScript. I'll agree on that one. Typical case - min/max width expression that'll work in Strict/Quirks mode: ----------- CSS for standard compliant browsers: #wrapper {max-width: 1200px; min-width: 550px;} CSS for MSIE/win: #wrapper {width: 760px;} div#wrapper { width:expression(((document.compatMode && document.compatMode=='CSS1Compat') ? document.documentElement.clientWidth : document.body.clientWidth) > 1218 ? "1200px" : (((document.compatMode && document.compatMode=='CSS1Compat') ? document.documentElement.clientWidth : document.body.clientWidth) < 570 ? "552px" : "99.7%")); } @media print { div#wrapper {width: 100%!important;} } ------------ Nothing but !important will make IE/win override that expression (which is borrowed from javascript) when such a page is going to print -- even if the expression is wrapped in an @media screen rule. More info: <http://www.gunlaug.no/contents/wd_1_02_01.html#item34> regards Georg -- http://www.gunlaug.no ______________________________________________________________________ css-discuss [EMAIL PROTECTED] http://www.css-discuss.org/mailman/listinfo/css-d List wiki/FAQ -- http://css-discuss.incutio.com/ Supported by evolt.org -- http://www.evolt.org/help_support_evolt/