W3C home > Mailing lists > Public > www-style@w3.org > May 2004

'!important' rules

From: Sean M. Hall AKA Dante <pianoman@reno.com>
Date: 16 May 2004 00:49:18 +0000
Message-ID: <5C8F00F6_8BA9_4584_AD2A_867E59928794@webmail.loadmail.load.com>
To: www-style@w3.org

Does a rule with '!important' overrule an inline style?

Say I have this in my stylesheet:

li {
height: 20px !important;

And in the XHTML:

<li style="height: 22px">Item</li>

Will the height be 22px or 20px (forget about borders and padding)?

The problem is I was creating image tab rollovers. I replaced the images with Javascript, and used CSS to create rollovers. The odd thing is Mozilla and Opera only made the tabs 20px high and hdie the overflow was to give both declarations '!important'. IE doesn't understand !important, so I tried inline styles. Still didn't work.

Why can't all browsers be as great as Opera 7? Lol.
Received on Saturday, 15 May 2004 20:49:56 UTC

This archive was generated by hypermail 2.3.1 : Monday, 2 May 2016 14:27:13 UTC