about to explain this atypical behavior maybe it could be depend by the bunch of !important you have in the code
this iz my explanation about the !important
for a given property of a given block
as default the value assigned will be the last encountered in the code..
I mean
for example
if in ur code there is
...........
.itembox {
font-size:14px;
...
}
..........
.itembox {
font-size:9px;
...
}
....
the effective final value will be 9px
now u can to alter this natural sequential order by using !important
when u use !important .. that will be the final value for that property in that block ..
also if it isnt the last assigned value .
I mean
...........
.itembox {
font-size:14px !important;
...
}
..........
.itembox {
font-size:9px;
...
}
....
the final value will be 14 px ..
... now the important thing is
this !important will work ONLY IN THE MODERN BROWSERS
I will be more explicit ,,
it doesn't work in Internet explorer lesser then or equal to the version 6.
so this is normally used as a Internet explorer hack
for solving some specific problem you have in the layout of ie 6
so ..
it is not so frequent to use that
abusing of this could bring to some difference in the different browsers
cause its difficult to control that
[ its difficult without the !important too (= ]
with important you could get a value for ie different by the others browsers .. or, if you are lucky it does not make any change
The original purpose of !important feature it is for
to improve accessibility of documents by giving users with special requirements (large fonts, color combinations, etc.) control over presentation.
http://www.w3.org/TR/REC-CSS2/cascade.html#important-rulesand its really useful as ie hack
thats all bout !important
JUST a REAL EXAMPLE of the use of !important feature
/* hack min-height for IE lte6 */
height: auto !important; /* all modern browsers */
height: 50em; /* IE5.x e IE6 */
min-height: 50em; /* all modern browsers */
used for to simulate the min height in ie lte6
normally the box containing the content of the site is created with the DIV tag.
if u have a site with a variable length the final height will be given by the text into the box div
if in one page there isnt content ,, then the footer will come up ,, and it could go overlapping the lateral rail ( the menus)
to avoid this its normal to use something as
min-height:300px;
how to make this working in ie6 ???
simply by using the three lines of css code above;
ie doesnt know !important and doesnt know min-height
so ie will read
height: auto;
height: 50em;
at the end will be 50em (=800px)
more if the content exceed the 50em ,, ie will adapt automatically the height as a auto
and it doesnt happen in the other browsers =)
thats all for ie and in final it will work perfectly
the other browsers will read all the code
so the height will be auto (cause of the !important) with a minimal height of 50em
[till 50em it will work the min height; exceeding 50 em it will work the height auto ]
the second height:50 em is the value only for ie ,,,
well I stop here my f.. explanation
cause its coming a romance