"side menu"
Bootstrap 3.0.0 Snippet by evarevirus

<link href="//netdna.bootstrapcdn.com/bootstrap/3.0.0/css/bootstrap.min.css" rel="stylesheet" id="bootstrap-css"> <script src="//netdna.bootstrapcdn.com/bootstrap/3.0.0/js/bootstrap.min.js"></script> <script src="//code.jquery.com/jquery-1.11.1.min.js"></script> <!------ Include the above in your HEAD tag ----------> <!DOCTYPE html><html lang='en' class=''> <head><script src='//production-assets.codepen.io/assets/editor/live/console_runner-079c09a0e3b9ff743e39ee2d5637b9216b3545af0de366d4b9aad9dc87e26bfd.js'></script><script src='//production-assets.codepen.io/assets/editor/live/events_runner-73716630c22bbc8cff4bd0f07b135f00a0bdc5d14629260c3ec49e5606f98fdd.js'></script><script src='//production-assets.codepen.io/assets/editor/live/css_live_reload_init-2c0dc5167d60a5af3ee189d570b1835129687ea2a61bee3513dee3a50c115a77.js'></script><meta charset='UTF-8'><meta name="robots" content="noindex"><link rel="shortcut icon" type="image/x-icon" href="//production-assets.codepen.io/assets/favicon/favicon-8ea04875e70c4b0bb41da869e81236e54394d63638a1ef12fa558a4a835f1164.ico" /><link rel="mask-icon" type="" href="//production-assets.codepen.io/assets/favicon/logo-pin-f2d2b6d2c61838f7e76325261b7195c27224080bc099486ddd6dccb469b8e8e6.svg" color="#111" /><link rel="canonical" href="https://codepen.io/nwest88/pen/PwwZpv?limit=all&page=72&q=css" /> <style class="cp-pen-styles"> * { -webkit-box-sizing: border-box; -moz-box-sizing: border-box; -o-box-sizing: border-box; box-sizing: border-box; /* adds animation for all transitions */ -webkit-transition: .25s ease-in-out; -moz-transition: .25s ease-in-out; -o-transition: .25s ease-in-out; transition: .25s ease-in-out; margin: 0; padding: 0; -webkit-text-size-adjust: none; } /* Makes sure that everything is 100% height */ html,body { height: 100%; overflow: hidden; } /* gets the actual input out of the way; we're going to style the label instead */ #drawer-toggle { position: absolute; opacity: 0; } #drawer-toggle-label { -webkit-touch-callout: none; -webkit-user-select: none; -khtml-user-select: none; -moz-user-select: none; -ms-user-select: none; user-select: none; left: 0px; height:50px; width: 50px; display: block; position: fixed; background: rgba(255,255,255,.0); z-index: 1; } /* adds our "hamburger" menu icon */ #drawer-toggle-label:before { content: ''; display: block; position: absolute; height: 2px; width: 24px; background: #8d8d8d; left: 13px; top: 18px; box-shadow: 0 6px 0 #8d8d8d, 0 12px 0 #8d8d8d; } header { width: 100%; position: fixed; left: 0px; background: #efefef; padding: 10px 10px 10px 50px; font-size: 30px; line-height: 30px; z-index: 0; } /* drawer menu pane - note the 0px width */ #drawer { position: fixed; top: 0; left:-300px; height: 100%; width: 300px; background: #2f2f2f; overflow-x: hidden; overflow-y: scroll; padding: 20px; -webkit-overflow-scrolling: touch; } /* actual page content pane */ #page-content { margin-left: 0px; margin-top: 50px; width: 100%; height: calc(100% - 50px); overflow-x:hidden; overflow-y:scroll; -webkit-overflow-scrolling: touch; padding: 20px; } /* checked styles (menu open state) */ #drawer-toggle:checked ~ #drawer-toggle-label { height: 100%; width: calc(100% - 300px); background: rgba(255,255,255,.8); } #drawer-toggle:checked ~ #drawer-toggle-label, #drawer-toggle:checked ~ header { left: 300px; } #drawer-toggle:checked ~ #drawer { left: 0px; } #drawer-toggle:checked ~ #page-content { margin-left: 300px; } /* Menu item styles */ #drawer ul { list-style-type:none; } #drawer ul a { display:block; padding:10px; color:#c7c7c7; text-decoration:none; } #drawer ul a:hover { color:white; } /* Responsive MQ */ @media all and (max-width:350px) { #drawer-toggle:checked ~ #drawer-toggle-label { height: 100%; width: 50px; } #drawer-toggle:checked ~ #drawer-toggle-label, #drawer-toggle:checked ~ header { left: calc(100% - 50px); } #drawer-toggle:checked ~ #drawer { width: calc(100% - 50px); padding: 20px; } #drawer-toggle:checked ~ #page-content { margin-left: calc(100% - 50px); } }</style></head><body> <body> <input type="checkbox" id="drawer-toggle" name="drawer-toggle"/> <label for="drawer-toggle" id="drawer-toggle-label"></label> <header>Header</header> <nav id="drawer"> <ul> <li><a href="#">Menu Item</a></li> <li><a href="#">Menu Item</a></li> <li><a href="#">Menu Item</a></li> <li><a href="#">Menu Item</a></li> </ul> </nav> <div id="page-content"> <p>Page Content</p> </div> </body> <script src='//production-assets.codepen.io/assets/common/stopExecutionOnTimeout-b2a7b3fe212eaa732349046d8416e00a9dec26eb7fd347590fbced3ab38af52e.js'></script> <script >/*http://designcouch.com/home/why/2014/04/23/pure-css-drawer-menu/*/ //# sourceURL=pen.js </script> </body></html>

Related: See More


Questions / Comments: