A warning against using the !important declaration as a hack:
see http://tantek.com/log/2004/09.html#d07t1434

here's an excerpt:
"IE (all platforms) supports !important, just go try the CSS1 Test Suite 
section 3.1 (http://www.w3.org/Style/CSS/Test/CSS1/current/sec31.htm) important 
test suite page for yourself. And if you check any of the CSS feature support 
charts out there, you'd see the same.

There is however a kernel of a bug hidden in this tip:

margin-top: 3.5em !important; margin-top: 2em 

    So, the top margin will be set to 3.5em for all browsers except IE, which 
will have a top margin of 2em 

First, the reported problem only occurs for IE/Windows based browsers (i.e. 
IE5/Mac handles !important properly, including in this case. Another reason to 
question the article, as it appears the author doesn't distinguish between 
IE/Windows and IE/Mac rendering engine behavior, which can be quite different.)

Second the problem actually has nothing to do with !important, but with the 
processing of multiple declarations of the same propertry in the same style 
rule. Similar problems result in IE/Windows if you try multiple declarations of 
the 'color' property for example with a CSS1 value followed by a CSS3 Color 
value that latter user agents support."

hope this helps,
-Grant


Rebecca Cox wrote:
> I'm pretty sure this isn't possible, but does anyone know if its
> possible to add the !important declaration to a style set with script,
[...]
> Its fine in Gecko but not IE6... Any ideas?

As just mentioned in the reply to another thread, IE ignores !important

-- 
Patrick H. Lauke
**********************************************************************
This message is intended for the addressee named and may contain
privileged information or confidential information or both. If you
are not the intended recipient please delete it and notify the sender.
**********************************************************************
******************************************************
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