All Posts by Email, Once a Week

Media Temple logo

CSS-Tricks is brought to you in part by Media Temple, the web hosting that we both use and recommend.

Is this a safe IE8 hack?

  • # January 22, 2013 at 5:47 am

    This seems to be a perfect way to target IE8. Anything I’m overlooking here?

    #onoff li+li+li a {
    float:left; /* Target IE8 */
    margin-right:-14px; /* Target IE8 */
    }
    #onoff li:nth-child(2) a, #onoff li:nth-child(3) a {
    position:absolute; /* Cancel target IE8 */
    z-index:1;
    color:green;
    font-weight:bold;
    margin:0; /* Cancel target IE8 */
    }

    # January 22, 2013 at 5:50 am

    This is not a really hack, but sure it works since IE8 doesn’t understand :nth-child() pseudo-selectors.

    However it will also target IE7 as far as I know.

    # January 22, 2013 at 6:41 am

    This reply has been reported for inappropriate content.

    Yeah I guess 7 too. No bigy

    # January 22, 2013 at 6:41 am

    This reply has been reported for inappropriate content.

    Thanks

Viewing 4 posts - 1 through 4 (of 4 total)

You must be logged in to reply to this topic.

There's a whole bunch of content on CSS-Tricks.

Search for Stuff   •   Browse the Archives

Get the Newsletter ... or get the RSS feed