Skip to content

:target not working in IE8 #91

Description

I have a mobile responsive menu with submenus, which uses :target for the Tab feature on smaller screens: A click on the menu toggle will expand / collapse the menu.

@media only screen and (max-width: 768px) {

  #menu:target .show {
    display: none;
  }

  #menu:target .hide, #menu:target .menu-items {
    display: inline-block;
    line-height: 75px;
  }

}

As :target is only partially supported in Internet Explorer 8, I wanted to use Selectivizr, which I added after my CSS-stylesheets in the head like so:

<!--[if (gte IE 6)&(lte IE 8)]>
        <script type="text/javascript" src="selectivizr.js"></script>
<![endif]-->

(tried both version: 1.0.2 and 1.0.3b)

However, it does not work. The menu does not expand.

Any idea what is wrong?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions