Forums

The forums ran from 2008-2020 and are now closed and viewable here as an archive.

Home Forums CSS Is this a safe IE8 hack?

  • This topic is empty.
Viewing 2 posts - 1 through 2 (of 2 total)
  • Author
    Posts
  • #42167
    Eric
    Member

    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 */
    }

    #121835
    Kitty Giraudel
    Participant

    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.

Viewing 2 posts - 1 through 2 (of 2 total)
  • The forum ‘CSS’ is closed to new topics and replies.