Using Valid IE CSS Hacks

It’s important to remember that eventually IE will catch up to the times and we need to keep our hacks clean and ready for the future. At the moment, IE 6- seems to ignore decedent selectors so we can use that to our advantage when targeting a hack. We can use the child selector to replace both the old star html bug:

 

* html somehack{};

…and underscore hack:

ol {padding:0; _padding-left:5px;}

Here’s how:

div#header {margin-top:-3px;} /* IE HACK */
body > div#header {margin-top:0;} /* Reverse IE HACK */

.promo h3 {height:21px;} /* IE HACK */
.promo > h3 {height:auto; min-height:21px;} /* Reverse IE HACK */

ol {padding:0 0 0 5px;} /* IE HACK */
html > body ol {padding:0;} /* Reverse IE HACK */

0 Responses to “Using Valid IE CSS Hacks”


  1. No Comments

Leave a Reply