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 is required to process package imports. If you need a different preprocessor remove all packages first.

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

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

              
                <!-- Bootstrap -->
<div class="container">
	<div class="row">
		<header class="col demo">Header</header>		
	</div>
	<div class="row">
		<aside class="col-md-4 demo">Sidebar</aside>
		<main class="col demo">Main content</main>
	</div>
	<div class="row">
		<footer class="col demo">Footer</footer>
	</div>
</div>

<br><br><br>

<!-- Foundation -->
<div class="grid-container">
	<div class="grid-x">
		<header class="cell demo">Header</header>
	</div>
	<div class="grid-x">
		<aside class="cell medium-4 demo">Sidebar</aside>
		<main class="cell auto demo">Main content</main>
	</div>
	<div class="grid-x">
		<footer class="cell demo">Footer</footer>
	</div>
</div>

<br><br><br>

<!-- Floats -->
<div class="demo-container">
	<header class="demo">Header</header>
	<div class="clearfix">
		<aside class="demo">Sidebar</aside>
		<main class="demo">Main content</main>
	</div>
	<footer class="demo">Footer</footer>
</div>

<br><br><br>

<!-- CSS Grid -->
<div class="demo-grid">
	<header class="demo">Header</header>
	<aside class="demo">Sidebar</aside>
	<main class="demo">Main content</main>
	<footer class="demo">Footer</footer>
</div>
              
            
!

CSS

              
                /* Demo styles, not related to Grid. */
.demo {
	color: rgba(255, 255, 255, 1);
	padding: 2rem;
	border-radius: 3px;
}

header.demo {
	background-color: #6B5CA5;
}

aside.demo {
	background-color: #52AA8A;
}

main.demo {
	background-color: #F76C5E;
}

footer.demo {
	background-color: #3AAED8;	
}

/* Float-based layout. */
@media only screen and (min-width: 600px) {
	.demo-container {
		width: 95%;
		margin: 0 auto;
	}
	
	.demo-container aside {
		width: 33%;
		float: left;
	}
	
	.demo-container main {
		float: left;
		width: 67%;
	}
}

.clearfix::after {
	content: "";
	clear: both;
	display: table;
}

/* CSS Grid layout. */
.demo-grid {
	width: 95%;
	margin: 0 auto;
	display: grid;
	grid-template-columns: 1fr 2fr;
}

.demo-grid header,
.demo-grid footer,
.demo-grid aside,
.demo-grid main {
	grid-column: span 2;
}

.demo-grid aside {
	grid-row: 3;
}

@media only screen and (min-width: 600px) {
	.demo-grid aside {
		grid-column: 1;
		grid-row: 2;
	}	

	.demo-grid main {
		grid-column: 2 / -1;
	}	
}
              
            
!

JS

              
                
              
            
!
999px

Console