Pen Settings

HTML

CSS

CSS Base

Vendor Prefixing

Add External Stylesheets/Pens

Any URLs added here will be added as <link>s in order, and before the CSS in the editor. You can use the CSS from another Pen by using its URL and the proper URL extension.

+ add another resource

JavaScript

Babel includes JSX processing.

Add External Scripts/Pens

Any URL's added here will be added as <script>s in order, and run before the JavaScript in the editor. You can use the URL of any other Pen and it will include the JavaScript from that Pen.

+ add another resource

Packages

Add Packages

Search for and use JavaScript packages from npm here. By selecting a package, an import statement will be added to the top of the JavaScript editor for this package.

Behavior

Save Automatically?

If active, Pens will autosave every 30 seconds after being saved once.

Auto-Updating Preview

If enabled, the preview panel updates automatically as you code. If disabled, use the "Run" button to update.

Format on Save

If enabled, your code will be formatted when you actively save your Pen. Note: your code becomes un-folded during formatting.

Editor Settings

Code Indentation

Want to change your Syntax Highlighting theme, Fonts and more?

Visit your global Editor Settings.

HTML

              
                <html>
<body>
<div class="menu-wrapper">
	<!-- Once checkbox below is checked the menu pops out -->
	<input type="checkbox" id="menu-activator">
	<div id="menu">
		<div id="icon"><img src="https://blog.codepen.io/wp-content/uploads/2012/06/Button-Black-Large.png"></div>
		<ul id="menu-list">
			<li><h2>Dashboard</h2></li>
			<li><h2>Your Account</h2></li>
			<li><h2>Forums</h2></li>
			<li><h2>Settings</h2></li>
			<li><h2>Site Map</h2></li>
			<li><h2>Help</h2></li>
			<li><h2>Contact Us</h2></li>
		</ul>
	</div>
</div>

<!-- END -->

  
  <h1 class="main-h1"><span>Pure CSS Responsive Nav Slider</span></h1>
  
</body>
</html>
              
            
!

CSS

              
                body {
	background-color: skyblue;
	color: white;
 min-height:700px;
}


.main-h1 {
  margin-top:45px;
  font-weight:bolder;
  font-size:60px;
  font-family: helvetica;
  text-align:center;
  line-height: 80px;
}

.main-h1 span{
  text-decoration: underline;
  border-bottom:solid;
}



/*-------------------------------
              MENU
-------------------------------*/



li a{
	color: white;
	text-decoration: none;
}

li h2{
	font-size: 1.5em;
}


#menu{
	width: 200px;
	height: 100%;
	background: #333;
	position: fixed;
	top: 0px;
	left: -200px;
	-webkit-transition:.3s;
	border-top: solid black;
}
#icon{
	width: 200px;
	height: 200px;
	margin: 5px 0 5px 0;
}

#icon img{
	width: 200px;
}

li{
	padding: 10px;
	transition:.3s; 
	background: -webkit-linear-gradient(#555, black);
	background: linear-gradient(#555, black);
	border-radius: 10px;
}
li:hover{
	font-size: 1.1em;
}

input#menu-activator{
	-webkit-transition:.3s;
	position: fixed;
	top: 0px;
	left: 0px;
	background: red;
	margin:0px;
	cursor: pointer;
}

input#menu-activator:after{
	content: " ";
	position: fixed;
	font-size: 4.5em;
	width: 50px;
	height: 50px;
	background: #333 url("https://imgur.com/P4tWpm7.png") no-repeat center 10px;
	border-top: solid; 
	border-bottom: solid;
	border-right: solid; 
}

input#menu-activator:hover:after{
	background: #444 url("https://imgur.com/P4tWpm7.png") no-repeat center 10px;
}

input#menu-activator[type=checkbox]:checked {
	left: 200px; 
}
input#menu-activator[type=checkbox]:checked:after {
	content: "";
	font-size: 4.5em;
	width: 50px;
	height: 50px;
	position: fixed; 
	background: #333 url("https://imgur.com/h38GnBI.png") no-repeat center 10px;
}

input[type=checkbox]:checked + div#menu{
	left: 0px;
}




/* ---------- MEDIA QUERIES ---------- */



@media screen and (max-width: 600px){

li h2 {
	font-size: 1.2em;
}

li:hover{
padding-top: 11px;
}

#menu{
	border-top: #333;
	width: 100%;
	left: 0px;
	height: 50px;
}

#icon{
	width: 40px;
	height: 40px;
	float: right;
	margin: 5px 5px 0 0;
}

#icon img{
	width: 40px;
}

#menu-activator{
	z-index: 10;
}
#menu-list{
	z-index: 20;
	position: absolute;
	top: -275px;
	background: #333;
	width: 100%;
	padding-top: 2px;
}


/*menu-activator*/


input#menu-activator:after{
	content: " ";
	background: #333 url("https://imgur.com/cLxK5I5.png") no-repeat center 14px;
	border-top: none; 
	border-bottom: none;
	border-right: none; 
	background-size: 75%;
}

input#menu-activator:hover:after{
	background: #444 url("https://imgur.com/cLxK5I5.png") no-repeat center 14px;
	background-size: 75%;
}

input#menu-activator[type=checkbox]:checked {
	left: 0px;
	top: 279px; 
}
input#menu-activator[type=checkbox]:checked:after {
	content: "";
	height: 42px;
	background: #333 url("https://imgur.com/cLxK5I5.png") no-repeat center 7px;
	background-size: 75%;
}

input#menu-activator[type=checkbox]:checked + div#menu{
	left: 0px;
	top: 272px;
}


/* 
---- NO JAVASCRIPT! ----













I relize some things need touching up.


I declare this code PUBLIC DOMAIN

:)

*/
              
            
!

JS

              
                /* -Webkit- works best :) */

              
            
!
999px

Console