css Audio - Active file-generic CSS - Active Generic - Active HTML - Active JS - Active SVG - Active Text - Active file-generic Video - Active header Love html icon-new-collection icon-person icon-team numbered-list123 pop-out spinner split-screen star tv

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

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

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.

HTML Settings

Here you can Sed posuere consectetur est at lobortis. Donec ullamcorper nulla non metus auctor fringilla. Maecenas sed diam eget risus varius blandit sit amet non magna. Donec id elit non mi porta gravida at eget metus. Praesent commodo cursus magna, vel scelerisque nisl consectetur et.

            
              	<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>

            
          
!
            
              * {
	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;
}
            
          
!
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