IE6 and the !important rule 10.08.2008 @ 05:13pm
There are some people out there that believe IE6 does not support the !important declaration but it does. However, it supports it in it's own IE6 way which I will explain.
It works fine as long as the property you are applying the !important rule to is only declared once in that selector. For example, the following would work fine in IE6:
#mybox {
background-color: #f00;
border: 1px solid #c00;
height: 100px !important;
padding: 20px;
}
However, if you were to try this next block of code, it would not apply the !important height and will apply the other height declaration instead:
#mybox {
background-color: #f00;
border: 1px solid #c00;
height: 100px !important;
height: 150px;
padding: 20px;
}
So remember, only declare your property once within a selector if you would like it to be !important.
What people think...
Latest entries
Categories
Who am I?
I am Jenna Smith - a front end web developer who has been busy coding XHTML & CSS for the last 6 years. If you are interested in seeing my work or getting in touch you can do so through my growldesign website.
Comments have been disabled.