Forums

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

Home Forums CSS Mobile Menu Using :target Opens but Doesn't Close

  • This topic is empty.
Viewing 2 posts - 1 through 2 (of 2 total)
  • Author
    Posts
  • #148606
    svoltmer
    Participant

    I have added a mobile navigation the appears at the @media max-width:720. The menu comes in from the left side when you click the hamburger icon on the right(using :target), but if you click it again it will not close because the close icon is behind the open icon (that should be changing it’s state to display:none). Could someone take a look at this and point me in the right direction? Here is the site:

    http://www.rose-hulman.edu/testing/

    #148615
    svoltmer
    Participant

    Solved it myself. I forgot that my tags with my .open and .close classes had to be the element adjacent to my :target to select them with the adjacent sibling combinator (+). Woops.

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