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

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.

HTML

              
                	<nav>
		<ul class="nav">
			<li><a href="">Chapter 1</a></li>
			<li><a href="">Chapter 2</a></li>
			<li><a href="">Chapter 3</a></li>
<li><a href="">Chapter 5</a></li>
			<li><a href="">Chapter 6</a></li>
		</ul>
	</nav>

	<article class="main content">
	   <h1>Chapter 1</h1>

  <p>When the first strong sunlight of May covered the tree-arched avenues
  of Center City with green, the riots started.</p>
  
  <p>The people gathered in angry knots outside the city hall, met in the park and littered its walks with newspapers and magazines as they gobbled up editorial comment at a furious rate, slipped with dark of night through back alleys and planned things with furious futility.</p>
  
  <p>Center City's finest knew when to make themselves scarce: their uniforms stood for everything objectionable at this time and they might be subjected to clubs, stones, taunts, threats, leers--and knives.</p>
  
  <p>But Center City, like most communities in United North America, had survived the Riots before and would survive them again. On past performances, the damage could be estimated, too. Two-hundred fifty-seven plate glass windows would be broken, three-hundred twelve limbs fractured. Several thousand people would be treated for minor bruises and abrasions, Center City would receive half that many damage suits. The list had been drawn clearly and accurately; it hardly ever deviated.</p>
    
  <p>And Center City would meet its quota. With a demonstration of reluctance, of course. The healthy approved way to get over social trauma once every seven-hundred eighty days.</p>
	</article>

	<footer class="footnotes content">
		<p>Text from the public domain book Recruit for Andromeda by Milton Lesser available on <a href="http://www.gutenberg.org/cache/epub/50449/">the Project Gutenberg website</a>.</p>

	</footer>
              
            
!

CSS

              
                body {
	margin: 0;
	padding: 40px;
}

.content {
	background-color: #fdfdfd;
	padding: 20px;
	margin: 0 0 1em 0;
}

ul.nav {
	list-style: none;
	margin: 0;
	padding: 0;
	margin: 0 0 1em 0;
}

ul.nav li {
	border: 1px solid #444;
	background-color: #fff;
}

ul.nav li a {
  padding: 20px 40px;
  text-decoration: none;
  display: block;
  color: #444;
	font-weight: bold;
}

nav ul{
  display: flex;
  flex-direction: row;
  justify-content: space-between;
}

@media (max-width: 800px) {
  nav ul {
    flex-wrap: wrap;
  }
  
  nav ul li {
    flex: auto;
    margin: 0 10px 10px 0;
  }
}
              
            
!

JS

              
                
              
            
!
999px

Console