• Resolved Bev

    (@bstofko)


    The menu on the Twenty Seventeen theme uses z-index to overlap the page contents when the page is scrolled. However, the stacking context of the main “.site-content-contain” block is not set, so it is possible for the contents of the page to appear in front of the menu when scrolling. A solution would be to add z-index:1 to the CSS for “.site-content-contain”.

    The issue can be illustrated by adding a small test case to a page containing the following:

    <div style="position:relative;color: white;">
    <div style="padding: 10px; background: orange; z-index: 6; position: absolute; left: 0;">z-index = 6</div>
    <div style="padding: 10px; background: blue; z-index: 7; position: absolute; left: 130px;">z-index = 7</div>
    <div style="padding: 10px; background: green; z-index: auto; position: absolute; left: 270px;">z-index = auto</div>
    </div>
Viewing 5 replies - 1 through 5 (of 5 total)
  • Moderator Ipstenu (Mika Epstein)

    (@ipstenu)

    ?????? Advisor and Activist

    Pinging @davidakennedy and @karmatosed

    David A. Kennedy

    (@davidakennedy)

    Hello @bstofko!

    Thanks for the report!

    I was able to see what you mean with your example code – much appreciated!

    This isn’t really a bug though. The z-index settings in the CSS work now. In general, I try to observe these rules for z-index:

    Only use them when needed.
    Don’t go too high in number, except for items that should always be on top.
    Try to make them logical.

    I’d rather not add more z-index CSS to account for edge cases. If someone needs to start adding z-index rules in the content, or to the theme, they’re likely comfortable enough to modify things to fit their needs.

    Thread Starter Bev

    (@bstofko)

    Fair enough. Although I think you might find a lot of gallery plugins and the like use z-index to position things. Just a heads up.

    On home page initial load view, main menu is at the bottom. The submenus drop down out of view instead of up so they can be read…
    have any idea how to drop up the submenu? oor to move the menu to be in the top instead bottom?

    Moderator Ipstenu (Mika Epstein)

    (@ipstenu)

    ?????? Advisor and Activist

Viewing 5 replies - 1 through 5 (of 5 total)
  • The topic ‘Twenty Seventeen drop-down menu z-index’ is closed to new replies.