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


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="header">
  <h1>Floated layout</h1>

<div class="main">
<div class="sidebar">
      <li><a href="#">Home</a></li>
      <li><a href="#">About</a></li>
      <li><a href="#">Contact</a></li>
<div class="article">
  <h1>Welcome to our floated layout site</h1>
  <p>Far from perfect but look how much cleaner this code is.</p>
  <p> Utilises a clearfix hack, and background linear gradient on .main parent element.</p>

<div class="footer">
  <p>copyright ©Floated SCHOOL ltd</


                *{ padding:0; margin:0;}
body {font:16px Helvetica, Arial,sans-serif; margin:10px;}
.header {background-color:#91AB6F; padding:25px;}
.header h1{ font-size:30px; color:white;}
.main { background: linear-gradient(90deg, #B1D188 25%,#C7EB98 25.0001%, #B1D188 100%);}
.sidebar  { width:25%; float:left;}
.sidebar ul{ line-height:40px; list-style:none; font-size:19px; padding:20px}
.sidebar a {color:#5B6B46;}
.article  { float:left; width:75%; padding-bottom:9em; }
.article h1{ margin:25px;}
.article p{ margin:25px;}
.main:after{ content:""; display:table; clear:both;}

.footer{ background-color:#5B6B46; color:white; text-align:center; padding:10px;}