Pen Settings



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


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


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.


Auto Save

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.


                	<input type="checkbox" id="show-menu" role="button">

	<ul id="menu">
		<li><a href="#about">About Me</a></li>
		<li><a href="#portfolio">Portfolio</a></li>
		<li><a href="#blog">Blog</a></li>

	<div id="wrapper">

        <!-- clicking this label will check and uncheck the checkbox -->
			<label for="show-menu">Menu</label>

			<h1>Mobile Push Menu With CSS</h1>
			<p>Click on the word Menu above to open or close the menu.</p>
        <p>This pure CSS push-down menu is simple to code but it has its limits. The menu doesn't close when you click a link. Part of the problem is that a checkbox has only two states, checked and unchecked. Also these states can only be toggled by clicking on the checkbox or (one of) its label(s).</p>

		<section id="about">
			<h2>About Me</h2>

		<section id="portfolio">

		<section id="blog">



/* Hide Checkbox */
#show-menu {
	display: none;

/* Put menu above canvas and set up transition */
#menu {
	position: absolute;
	top: -5em;

	-webkit-transition: top .3s ease-in;
	transition: top .3s ease-in;


/* Place menu at top */
#wrapper {
	position: relative;
	top: 0;

	-webkit-transition: top .3s ease-in;
	transition: top .3s ease-in;

/* change position of both when checkbox is clicked */
#show-menu:checked ~ #wrapper {
	top: 5em;
#show-menu:checked ~ #menu {
	top: 0;

/* Unnecessary styling stuff */
#menu {
  background-color: #FAD89B;
  width: calc(100% - 56px);
header, section {
	height: 500px;
header {
	background-color: #B598A2;
#about {
	background-color: #73799E;
#portfolio {
	background-color: #809E90;
#blog {
	background-color: #BCBD9C;