cssAudio - Activefile-genericCSS - ActiveGeneric - ActiveHTML - ActiveImage - ActiveJS - ActiveSVG - ActiveText - Activefile-genericVideo - ActiveLovehtmlicon-new-collectionicon-personicon-teamlog-outoctocatpop-outspinnerstartv

Pen Settings

CSS Base

Vendor Prefixing

Add External Stylesheets/Pens

Any URL's added here will be added as <link>s in order, and before the CSS in the editor. If you link to another Pen, it will include the CSS from that Pen. If the preprocessor matches, it will attempt to combine them before processing.

+ add another resource

Looking for quick-add? Try the external resource search, it's quicker and gives you access to the most recent version of thousands of libraries. ☝️

You're using npm packages, so we've auto-selected Babel for you here, which we require to process imports and make it all work. If you need to use a different JavaScript preprocessor, remove the packages in the npm tab.

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

Looking for quick-add? Try the external resource search, it's quicker and gives you access to the most recent version of thousands of libraries. ☝️

Use npm Packages

We can make npm packages available for you to use in your JavaScript. We use webpack to prepare them and make them available to import. We'll also process your JavaScript with Babel.

⚠️ This feature can only be used by logged in users.

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
🕑 One or more of the npm packages you are using needs to be built. You're the first person to ever need it! We're building it right now and your preview will start updating again when it's ready.
Loading ..................

Console