cssAudio - Activefile-genericCSS - ActiveGeneric - ActiveHTML - ActiveImage - ActiveJS - ActiveSVG - ActiveText - Activefile-genericVideo - Activehtmlicon-personicon-teamoctocatpop-outspinnerstartv

Pen Settings

CSS Base

Vendor Prefixing

Add External CSS

These stylesheets will be added in this order and before the code you write in the CSS editor. You can also add another Pen here, and it will pull the CSS from it. Try typing "font" or "ribbon" below.

Quick-add: + add another resource

Add External JavaScript

These scripts will run in this order and before the code in the JavaScript editor. You can also link to another Pen here, and it will run the JavaScript from it. Also try typing the name of any popular library.

Quick-add: + add another resource

Code Indentation

     

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.

            
              
<input type="checkbox" id="main-nav-check">
<div class="wrapper">
	<header>
		<label for="main-nav-check" class="toggle" onclick="" title="Menu">&#x2261;</label>
		<h1>Your logo goes here</h1>
		<div id="menu">
			<label for="main-nav-check" class="toggle" onclick="" title="Close">&times;</label>

			<ul>
				<li><a href="#">Home</a></li>
				<li><a href="#">Home</a></li>
				<li><a href="#">Home</a></li>
				<li><a href="#">Home</a></li>
			</ul>
		</div>
		<!-- closing menu -->
	</header>

	<div class="container">
		

		<p>Lorem ipsum dolor sit amet, consectetur adipiscing elit. Sed laoreet convallis erat non viverra. Duis tristique id eros vitae suscipit. In gravida placerat sollicitudin. Sed augue neque, tincidunt a auctor vel, semper at ex. Morbi ornare nisl in tortor laoreet aliquam. In varius nulla ac euismod gravida. Aenean quis mi non turpis molestie eleifend sit amet viverra massa. Nulla volutpat consectetur tellus eu viverra. Quisque ullamcorper nisi justo, quis malesuada odio posuere eget. In ornare turpis et nisl scelerisque, ac mollis felis consectetur. Quisque vel feugiat nunc. Vestibulum bibendum viverra eros. Sed at dui elementum, posuere nunc ut, gravida ex. Nullam nec lorem blandit, cursus dolor et, lobortis justo. Curabitur nec metus tortor.</p>

		<p>Curabitur blandit urna ligula, id dapibus ante porttitor ut. Sed convallis turpis a dui ultricies porta. Integer sed libero sit amet nisi eleifend sollicitudin. Integer vitae libero et tellus gravida consequat. Praesent dignissim libero mi, maximus malesuada eros consectetur ut. Cras ipsum felis, lacinia at sapien quis, pellentesque tempor massa. Sed at dignissim ipsum, a pretium dolor.</p>

	</div>
</div>
            
          
!
            
              
	* {
		margin: 0;
		padding: 0;
	}
	body {
		font-family: helvetica, arial, sans-serif;
		background-color: #98B7C7;
	}

	h1 {
		font-size: 1em;
		text-align: center;
		line-height: 3em;
	}

	p {margin-bottom: 1em;}

	.wrapper {
		background-color: #fff;
	}

	header {
		background-color: #354049;
		color: #fff;
		height: 3em;
	}
	#menu {
		padding-bottom: 1em;
		position:absolute;
		top: 0;
		bottom:0;
		width:13.75em; 
		background:#354049;
		z-index:9999;
		left:-13.75em;
	}
	#menu ul {
		margin-top: 3em;
	}
	#menu ul:after {
		content: "";
  		display: table;
  		clear: both;
	}
	#menu li {
		list-style: none;
		padding: .6em 1em;
		border-bottom: 1px solid #ccc;
		background-color: #62CEB6;
	}
	#menu li a {
		color: #fff;
	}

	#main-nav-check { 
		position:absolute; 
		top:-9999px; 
		left:-9999px 
	}

	.toggle {
		cursor: pointer;
		font-size: 1.5em;
		float: left;
		line-height: 2.2em;
		padding-left: .5em;
	}

	#menu .toggle {
		color: #fff;
	}

	.container {
		padding: 1em;
	}

	.wrapper {   
		-webkit-transform:translate(0,0); 
		-ms-transform:translate(0,0); 
		transform:translate(0,0);
		-webkit-transition:-webkit-transform .25s ease; 
		transition:transform .25s ease;
	}

	/* #### - define ids of animated container, menu and sub-menus here - #### */
	#main-nav-check:checked ~ .wrapper { 
		-webkit-transform:translate(13.75em,0); 
		-ms-transform:translate(13.75em,0); 
		transform:translate(13.75em,0)
	}


	@media all and (min-width: 600px) {
		.wrapper {
			width: 96%;
      margin: 0 auto;
		}
		header {
			height: inherit;
			padding: 1em;
		}
		h1 {
			text-align: left;
			font-size: 2em;
			line-height: 1;
			font-weight: normal;
		}
		#menu {
			position: inherit;
			width: 100%;
		}
		#menu ul {
			margin-top: 1em;
		}
		#menu li {
			float: left;
			margin-right: .5em;
		}
		.toggle {
			display: none;
		}
	}
            
          
!
999px
Close

Asset uploading is a PRO feature.

As a PRO member, you can drag-and-drop upload files here to use as resources. Images, Libraries, JSON data... anything you want. You can even edit them anytime, like any other code on CodePen.

Go PRO

Loading ..................

Console