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.


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.


                <div class="left">
	<h2>Left floating column</h2>
        <legend>Apply there &rarr;&nbsp;</legend>
        <label><input type="radio" name="style" onclick="fix('')" checked>Nothing</label>
        <label><input type="radio" name="style" onclick="fix('clearfix')">Clearfix</label>
        <label><input type="radio" name="style" onclick="fix('overflow')">overflow:hidden</label>
        <label><input type="radio" name="style" onclick="fix('table')">display:table</label>
        <label><input type="radio" name="style" onclick="fix('new_context')">Display:table with width hack</label>
        <label><input type="radio" name="style" onclick="fix('column')">Column-count:1</label>
        <label><input type="radio" name="style" onclick="fix('flow-root')">Display:flow-root</label>
<div class="center" id="column">
	<div class="date">24.01.2017</div>
	<p>Below comes an image with float:left</p>
	<img src="" class="float-left">
	<p class="clear-both">And this paragraph belongs to the main column and has clear:both;</p>
	<p>And another floating img below</p>
	<img src="" class="float-left" style="margin-bottom: 5px;">
	<div class="absolute">Abs block</div>


                * { margin: 0; padding: 0;}

body { margin: 100px;}

/* Общие стили */
.left {
	float: left;
	width: 200px;
	background: #FC6;
	position: relative;
	z-index: 1;

label { display: block;}
h2 { margin-top: 10px;}
.float-left { float: left;}
.clear-both { 
	font-size: 15px; 
	clear: both; 
	background: #F99;
.date { 
	font-size: 20px;
	float: right;
	background: #FC0;
	padding: 2px 5px;
	margin: -10px -5px 0 0;
.absolute {
	position: absolute;
	bottom: -25px;
	right: 10px;
	width: 50px;
	height: 50px;
	background: white;
	border: 2px solid black;

.center {background: #E76D13; position: relative; padding: 0 10px;}
.clearfix:after {
    content: "";
    display: block;
    clear: both;

.overflow {
    overflow: hidden;

.table {
	display: table; 

.new_context {
    display: table;

.new_context:after {
	content: '1 1';
	display: block;
  overflow: hidden;
  height: 0;
	word-spacing: 99in; /* emulates wide text in the table */

.column {
  -webkit-column-count: 1;
  -moz-column-count: 1;
  column-count: 1;

.flow-root {
    display: flow-root;


                function fix(zzz) {
    document.getElementById('column').className = 'center '+zzz;