Pen Settings

HTML

CSS

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

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

Auto Save

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

              
                <header>
  <div class="logo">
  </div>
  <nav class="menu">
    <ul>
      <li><a href="">Link</a></li>
      <li><a href="">Link</a></li>
      <li><a href="">Link</a></li>
      <li><a href="">Link</a></li>
    </ul>
  </nav>
  <div class="social">
    <ul>
      <li><a href=""><i class="fa fa-facebook fa-fw"></i></a></li>
      <li><a href=""><i class="fa fa-twitter fa-fw"></i></a></li>
      <li><a href=""><i class="fa fa-google-plus fa-fw"></i></a></li>
    </ul>
  </div>
</header>
<content>
  <section>
    <i class="fa fa-file-text-o"></i>
    <h1>Headline</h1>
    <p>Lorem ipsum dolor sit amet, consectetur adipisicing elit. Eius voluptate magnam officia deleniti, numquam accusamus vero nihil vitae aperiam, tenetur, officiis deserunt temporibus maiores quos ipsa pariatur architecto totam laboriosam.</p>
  </section>
  <section class="accent">
    <i class="fa fa-pencil"></i>
    <h1>Headline</h1>
    <p>Lorem ipsum dolor sit amet, consectetur adipisicing elit. Eius voluptate magnam officia deleniti, numquam accusamus vero nihil vitae aperiam, tenetur, officiis deserunt temporibus maiores quos ipsa pariatur architecto totam laboriosam.</p>
  </section>
  <section class="dark">
    <i class="fa fa-code"></i>
    <h1>Headline</h1>
    <p>Lorem ipsum dolor sit amet, consectetur adipisicing elit. Eius voluptate magnam officia deleniti, numquam accusamus vero nihil vitae aperiam, tenetur, officiis deserunt temporibus maiores quos ipsa pariatur architecto totam laboriosam.</p>
  </section>
  <section class="light">
    <i class="fa fa-comment"></i>
    <h1>Headline</h1>
    <p>Lorem ipsum dolor sit amet, consectetur adipisicing elit. Eius voluptate magnam officia deleniti, numquam accusamus vero nihil vitae aperiam, tenetur, officiis deserunt temporibus maiores quos ipsa pariatur architecto totam laboriosam.</p>
  </section>
</content>
<footer>
  <ul>
    <h2>Title</h2>
    <li><a href="">Link</a></li>
    <li><a href="">Link</a></li>
    <li><a href="">Link</a></li>
    <li><a href="">Link</a></li>
    <li><a href="">Link</a></li>
    <li><a href="">Link</a></li>
  </ul>
  <ul>
    <h2>Title</h2>
    <li><a href="">Link</a></li>
    <li><a href="">Link</a></li>
    <li><a href="">Link</a></li>
    <li><a href="">Link</a></li>
    <li><a href="">Link</a></li>
    <li><a href="">Link</a></li>
  </ul>
  <ul>
    <h2>Title</h2>
    <li><a href="">Link</a></li>
    <li><a href="">Link</a></li>
    <li><a href="">Link</a></li>
    <li><a href="">Link</a></li>
    <li><a href="">Link</a></li>
    <li><a href="">Link</a></li>
    <li><a href="">Link</a></li>
  </ul>
  <ul>
    <h2>Title</h2>
    <li><a href="">Link</a></li>
    <li><a href="">Link</a></li>
    <li><a href="">Link</a></li>
    <li><a href="">Link</a></li>
    <li><a href="">Link</a></li>
    <li><a href="">Link</a></li>
    <li><a href="">Link</a></li>
  </ul>
</footer>
              
            
!

CSS

              
                * {
  box-sizing:border-box; /* Box sizing. Thanks Chris Coyier! */
  position:relative;
}
body {
  background:#000;
  font-size:1vmin;
  font-size:10px;
}
a {
  color:#fff;
  text-decoration:none;
}
a:hover {
  text-shadow:0 0 1em rgba(255,255,255,.8);
}
header {
  background:#000;
  height:10vh;
}
header * {
  display:inline-block;
  height:100%;
}
header a {
  font-size:4vmin;
  font-size:2.6em;
  line-height:10vmin; /* Set line-height to double font-size to vertically center. Less complicated than display:table-cell. */
}
.logo {
  background:orange;
  width:20%;
}
nav {
  text-align:right;
  text-transform:uppercase;
  width:54%;
}
nav ul {
  float:right;
}
nav li {
  margin-right:2em;
}
nav a {
  font-family:"Open Sans Condensed";
  font-weight:bold;
}
.social {
  background:#444;
  float:right;
  text-align:center;
  width:20%;
}
.social ul {
  width:100%;
}
.social li {
  width:32%;
}
content {
  background:#222;
  display:block;
}
content section {
  background:#eee;
  color:#555;
  display:inline-block; /* // TODO: figure out why I have to have this and the float for it to work. */
  float:left;
  max-width:100%;
  min-height:30vh;
  min-width:25%;
  padding:4em;
  text-align:center;
  width:24vmax;
}
content section:not(:last-of-type):after {
  background:inherit;
  content:"";
  height:2em;
  position:absolute;
  right:-1em;
  top:calc(50% - 1em); /* 50% of the parent's height - 1/2 the height of the element. */
  transform:rotate(45deg);
  width:2em;
  z-index:2;
}
content .fa {
  font-size:6vmax;
}
.accent {
  background:orange;
  color:#444;
}
.dark {
  background:#444;
  color:orange;
}
.light {
  background:#777;
  color:#eee;
}
h1 {
  font-size:2.4em;
  font-family:"Open Sans Condensed";
  font-weight:700;
  line-height:2.4em;
  text-transform:uppercase;
}
h2 {
  font-size:1.4em;
  line-height:3em;
}
p {
  font-family:"Open Sans";
  font-size:1.3em;
  line-height:1.6em;
}
.fa-pencil,.fa-comment {
  transform:scaleX(-1);
}
footer {
  clear:both;
  color:#777;
  font-family:"Open Sans Condensed";
  font-size:1.4em;
  font-weight:700;
  min-height:25vh;
}
footer ul {
  float:left;
  list-style:disc inside;
  padding:2em;
  width:25%;
}
footer li {
  margin:0 0 1em;
}
footer a {
  color:#777;
}
              
            
!

JS

              
                
              
            
!
999px

Console