WordPress.org

Support

Support » Themes and Templates » Twenty Thirteen » Hide sub-menu in mobile view

Hide sub-menu in mobile view

  • Hello,

    I am trying to hide the sub-menu items when the mobile menu gets activated.

    Currently when in mobile view all sub-menu’s are shown by default which results in a confusing and cluttered experience if you have many sub-menu items.

    Does anyone know how to hide the sub-menus in mobile view? I tried targeting them with CSS but could only get them to disappear on li:hover which isn’t what I wanted.

    My code that didn’t work:

    @media (max-width: 643px) {
    ul.sub-menu {
    display:none;
    }

Viewing 1 replies (of 1 total)
  • Try to target it more specifically, this should work:

    @media (max-width: 643px) {
    #site-navigation .sub-menu {
    display:none;
    }
    }
Viewing 1 replies (of 1 total)
  • The topic ‘Hide sub-menu in mobile view’ is closed to new replies.
Skip to toolbar