Pen Settings

HTML

CSS

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

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

              
                	<div class="flex-container">
		<header>
			<h1>Header</h1>
		</header>

		<div class="flex-area">
			
			<section>
				
				<article class='featured-article'>
					<h2>First Article</h2>
					<p>Lorem ipsum dolor sit amet, consectetur adipiscing elit. Praesent eget purus scelerisque nisi consectetur feugiat eget vel magna. Pellentesque eget mauris vitae dolor porta mattis. Vestibulum varius tincidunt tempus. Lorem ipsum dolor sit amet, consectetur adipiscing elit. Praesent euismod tellus vel dolor mattis vehicula. Donec eget leo massa. Vivamus id felis quam, sodales feugiat sapien. Etiam in justo at metus dignissim laoreet non ac arcu. Nunc semper condimentum metus ut luctus. Cum sociis natoque penatibus et magnis dis parturient montes, nascetur ridiculus mus. Aenean orci tellus, elementum non porta quis, egestas id quam. Integer a mi in felis pulvinar aliquam interdum nec augue. Proin magna enim, bibendum ut molestie ut, adipiscing sit amet odio.</p>

					<p>Vivamus nec venenatis lacus. Donec lectus nisi, pellentesque sed facilisis eget, commodo sit amet risus. Nam purus nisi, sollicitudin eleifend lacinia aliquet, sollicitudin eget turpis. Nam pellentesque diam non turpis elementum at aliquet justo iaculis. Aliquam erat volutpat. Vestibulum accumsan vulputate pharetra. Fusce in diam nec neque varius aliquet et at sem.</p>
				</article>
					
				<article>
					<h2>Second Article</h2>
					<p>Vivamus nec venenatis lacus. Donec lectus nisi, pellentesque sed facilisis eget, commodo sit amet risus. Nam purus nisi, sollicitudin eleifend lacinia aliquet, sollicitudin eget turpis. Nam pellentesque diam non turpis elementum at aliquet justo iaculis. Aliquam erat volutpat. Vestibulum accumsan vulputate pharetra. Fusce in diam nec neque varius aliquet et at sem.</p>
				</article>
				
				<article>
					<h2>Third Article</h2>
					<p>Lorem ipsum dolor sit amet, consectetur adipiscing elit. Praesent eget purus scelerisque nisi consectetur feugiat eget vel magna. Pellentesque eget mauris vitae dolor porta mattis. Vestibulum varius tincidunt tempus. Lorem ipsum dolor sit amet, consectetur adipiscing elit. Praesent euismod tellus vel dolor mattis vehicula. Donec eget leo massa. Vivamus id felis quam, sodales feugiat sapien. Etiam in justo at metus dignissim laoreet non ac arcu. Nunc semper condimentum metus ut luctus. Cum sociis natoque penatibus et magnis dis parturient montes, nascetur ridiculus mus. Aenean orci tellus, elementum non porta quis, egestas id quam. Integer a mi in felis pulvinar aliquam interdum nec augue. Proin magna enim, bibendum ut molestie ut, adipiscing sit amet odio.</p>
				</article>
			</section>

			<aside>
				<h1>Sidebar</h1>
				<div class="box"></div>
				<div class="box"></div>
				<div class="box"></div>
			</aside>

		</div>

		<footer>
			<h1>Footer</h1>
		</footer>

	</div>

              
            
!

CSS

              
                * {
	margin: 0;
	padding: 0;
	position: relative;
}

body {
	font-size: 100%;
	font-family: Trebuchet MS, sans-serif;
}

.flex-container {
	display: -webkit-flex;
	display: flex;
    -webkit-flex-flow: column;
            flex-flow: column;
}

header, footer {
	flex: 0 10 100px;
	-webkit-flex: 0 10 100px;
	    	
	background: #bbb;
	border-radius: 3px;
	border: solid 1px #222;
	
	margin: 4px;
	padding: 5px;
	
}

.flex-area {
	flex: 3 1 auto;
	-webkit-flex: 3 1 auto;
	    
	display: -webkit-flex;
	display: flex;
    -webkit-flex-flow: row;
            flex-flow: row;
	
	background: #bbb;
	border-radius: 3px;
	border: solid 1px #222;

	margin: 4px;
	padding: 5px;
}

section {
	display: -webkit-flex;
	display: flex;
    -webkit-flex-flow: row wrap;
            flex-flow: row wrap;
	
  -webkit-flex: 4 1 auto;	
			flex: 4 1 auto;
	
	background: #ffb;
	border-radius: 3px;
	border: solid 1px #222;
  
	margin: 4px;
	padding: 5px;

}

article {
	flex: 1 35%;
	-webkit-flex: 1 35%;

	background: #fbb;
	border-radius: 3px;
	border: solid 1px #222;
	
	margin: 4px;
	padding: 5px;
	
}

.featured-article {
	flex: 2 1 100%;
	-webkit-flex: 2 1 100%;

}

aside {
	flex: 0 0 240px;
	-webkit-flex: 0 0 240px;
	    
	display: -webkit-flex;
	display: flex;
    -webkit-flex-flow: column;
            flex-flow: column;   
	    
	background: #ffb;
	border-radius: 3px;
	border: solid 1px #222;	

	margin: 4px;
	padding: 5px;
}

.box {
	flex: 1;
	-webkit-flex: 1;
	    
	background: #fbb;
	border-radius: 3px;
	border: solid 1px #222;
	
	margin: 4px;
	padding: 5px;
}
              
            
!

JS

              
                
              
            
!
999px

Console