Star html for IE 7

Ok, so we all know that * html won’t work in IE 7 anymore.
So, I was digging around, and came across this site. Apparently using *+html will have the same effect on IE 7 as * html does on IE 6.
Good to know.

9 Responses to “Star html for IE 7”

  1. Lakshan Says:

    Hope my comments made you to dig for this ;)

  2. Indranil Says:

    Actually, it was another project that required the digging. But hey, I found one!

  3. The undersigned Says:

    I normally don’t use invalid css hacks etc, but use selectors only understood by the good browsers (non-ie’s), like html>body div { }

  4. Indranil Says:

    *undersigned*: well, sincethis is an IE only hack, and I like to treat the good browsers good, I’ll rather have more IE hack than avert IE hack. ;)

  5. Ben Gray Says:

    I’ll use inline hacks if there’s like, one thing that I need to display differently in IE. If there’s a whole lot then I’ll use a separete stylesheet. I know the inline hacks don’t validate but it’s worth the trade off for me.

  6. The undersigned Says:

    I have begun experimenting with php-stylesheets, thats really nice!

  7. jono1 Says:

    The thing is, in IE7 most if not all of IE6’s rendering bugs *should* be eradicated meaning you wont *need* to invalidate your CSS by using hacks.

  8. jono1 Says:

    That didn’t come out right, I didn’t anticipate text encased in *’s being turned bold - the “should” should really be in italics.

  9. Captain Ed Says:

    Actually, the star hack seems to work for me in IE7 (windows v7.0.5730.11). For instance, this code shows a red background in IE7.

    @* html #input-test@ {
    background-color: red;
    }

    I’ve also noticed that you can use stars in front of attributes to make them only work for IE7, like so:

    .myClass {
    width: 700px;
    *width: 750px; /* works for IE 7, ignored by other browsers. */
    }

Leave a Reply