solidcodes — 2012-12-11T22:40:07-05:00 — #1
Okay can someone explain to me what these codes do,
min-height:650px; /* for modern browsers */
height: auto !important; /* for modern browsers */
height:1200px; /* for IE5.x and IE6 */
So what is these codes below mean?
height: auto !important;
Thank you very much in advanced.
ralphm — 2012-12-11T22:46:00-05:00 — #2
!important just disables the normal cascade rules—meaning that this rule must apply even if a more specific height declaration would normally override this one. Generally, it's better not to use !important, as it indicates that things could be better coded from scratch. !important is really just a last resort option.
In this case, it might be meant to override the following declaration, which otherwise would override the height: auto rule.
The code looks a bit old, anyhow, as both IE5 and IE6 are dead and gone for all practical purposes.
rayzur — 2012-12-12T00:27:08-05:00 — #3
Yes, that was an old IE6 hack that was used when combining all your rules in one syntax (ruleset)
It was always better just to use min-height for good browsers and feed IE6 it's own hack in a separate ruleset.
IE6 treated height as if it was min-height due to it's expanding box bug.