IE 7 CSS fixes

According to IEBlog, IE 7 will improve these long-standing CSS deficiencies:

  • CSS 2.1 Selector support (child, adjacent, attribute, first-child etc.)
  • CSS 2.1 Fixed positioning
  • Alpha channel in PNG images
  • Fix :hover on all elements
  • Background-attachment: fixed on all elements not just body

Awesome! If I had to make a list of what I would like to see updated, this would have been it exactly.

I have one concern though… many of us have used IE 6’s inability to recognize child selectors to target IE 6 vs. EOMB (Every Other Modern Browser) for years… Basically, any time you wanted to use a CSS2 feature that IE 6 didn’t support (or worse yet, that broke the page in IE 6) you could just repeat the CSS selector with a dummy child selector attached:


/* IE6 styles */
#my-node {
    position:absolute;
    left:10px; top:10px;
}
/* override for EOMB with dummy child selector */
html>body #my-node {
    position:fixed;
}

Unless your HTML is totally jacked, you’re guaranteed to have a body tag that is a direct child of an html tag, so EOMB will pick up the second style. IE 6 doesn’t understand the > child selector, gets confused, and just ignores the style.

So this was actually a pretty convenient (if totally hackish) way of targeting EOMB vs. IE up to version 6. According to IEBlog, IE 7 will now understand these child selectors. Grand!

Here’s the problem… what if the IE folks don’t fix other issues that were worked around by hard-working web monkeys trying to make their sites “work” in every browser? We could see a lot of sites looking pretty funky in IE 7 when it’s released, as IE 7 picks up other styles never meant for IE’s rendering engine…

Taste the FUD, baby…

Leave a Reply