Last active
August 29, 2015 14:04
-
-
Save mcbrwr/44cbc0f7d3c445356948 to your computer and use it in GitHub Desktop.
CSS logic to show/hide a wrapper with navigation on small screens using the target selector instead of Javascript.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<header id="siteheader"> | |
<div class="container"> | |
<h1 class="siteheader-title"> | |
<a class="logo" href="/">...SITE NAME...</a> | |
</h1> | |
<div class="nav-wrapper"> | |
<!-- small screen menu controls --> | |
<a class="showmenu" href="#siteheader">Show menu</a> | |
<a class="hidemenu" href="#">Hide menu</a> | |
<!-- wrapper, hidden on small screen --> | |
<div class="menu-wrapper"> | |
<nav class="mainmenu"> | |
<ul>...</ul> | |
</nav> | |
<nav class="topmenu"> | |
<ul>...</ul> | |
</nav> | |
</div> | |
</div> | |
</div> | |
</header> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment