Grow your CSS skills. Land your dream job.

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

    Yeah I guess 7 too. No bigy

    # January 22, 2013 at 6:41 am

    Thanks

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

You must be logged in to reply to this topic.

*May or may not contain any actual "CSS" or "Tricks".