Twenty Seventeen drop-down menu z-index
-
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)
Viewing 5 replies - 1 through 5 (of 5 total)
- The topic ‘Twenty Seventeen drop-down menu z-index’ is closed to new replies.