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.

              <!-- Nav -->
<section id=nav>
  <a href=#><strong>EQCSS Demo</strong></a>
  <label for=sidebarToggle>Toggle Sidebar</label>
    @element '#nav' {
      body { padding-top: 75px; }
      #nav { position: fixed; top: 0; left: 0; background: #fff; color: #333; font-size: 120%; letter-spacing: -.02em; text-align: center; padding: 0 0 10px 0; z-index: 1000; box-shadow: rgba(0,0,0,.3) 0 0 15px; }
      #nav a, label { text-decoration: none; color: #000; display: block; padding: 10px 10px 0 10px; }
      #nav a:hover, #nav label:hover { color: #fc0; }
    @element '#nav' and (min-width: 500px) {
      body { padding-top: 40px; }
      #nav a, label { display; inline-block; }
      #nav a { float: left; }
      #nav label { float: right; }

<!-- Header -->
<section id=header>
  <div id=headlines>
    <h1 class="animated zoomInRight delay-one">Headline 1</h1>
    <h2 class="animated zoomInLeft delay-onefifty">Headline 2</h2>
  <img id=header_fg src=//placehold.it/1500x500/eee/333&text=%20 class="animated fadeInUp delay-twofifty">
  <img id=header_bg src=//placehold.it/1500x500/555/eee&text=%20>
    @element '#header' {
      #header div {  -webkit-user-select: none; -moz-user-select: none; -ms-user-select: none; -o-user-select: none; user-select: none; cursor: default; }
      #headlines { position: absolute; z-index: 700; width: 100%; text-align: center; top: 50%; margin-top: -6%; }
      #headlines h1, #headlines h2 { display: block; font-size: 125%; margin: 0 auto; padding: 0 .25em; line-height: 1.2; letter-spacing: -.05em; }
      #headlines h1 { font-size:150%; }
      #header img { float: left; width: 100%; height: auto; margin: 0; }
      #header #header_fg { position: absolute; top: 0; left: 0; z-index: 500; }
    @element "#header" and (min-width: 479px) { #headlines { font-size: 10pt; margin-top: -5%; } }
    @element "#header" and (min-width: 480px) { #headlines { font-size: 14pt; margin-top: -6%; } }
    @element "#header" and (min-width: 650px) { #headlines { font-size: 18pt; } }
    @element "#header" and (min-width: 768px) { #headlines { font-size: 24pt; } }
    @element "#header" and (min-width: 960px) { #headlines { font-size: 36pt; } }
    @element "#headlines h1" and (min-characters: 15) { #headlines h1 { font-size: 250%; } }
    @element "#headlines h1" and (min-characters: 30) { #headlines h1 { font-size: 200%; } }
    @element "#headlines h1" and (min-characters: 45) { #headlines h1 { font-size: 150%; } }
    @element "#headlines h2" and (min-characters: 15) { #headlines h2 { font-size: 100%; } }
    @element "#headlines h2" and (min-characters: 30) { #headlines h2 { font-size: 75%; } }
    @element "#headlines h2" and (min-characters: 45) { #headlines h2 { font-size: 50%; } }

<!-- Main -->
<input type=checkbox id=sidebarToggle>

  <!-- Sidebar -->
  <section id=sidebar>
    <aside class=newsletter>
      Curabitur dictum nibh risus, ac semper!
        <input type=email placeholder=email name=email id=signupEmail>
        <input type=submit value="Sign Up">
    <aside class=recent-posts>
      <h3>Recent Posts</h3>
      <a href=#>Etiam sagittis non tortor eget tempus. Curabitur fermentum quam ut erat lacinia varius.</a>
      <a href=#>Vivamus finibus neque id dolor bibendum, sed ullamcorper ipsum mattis.</a>
      <a href=#>Duis eros dui, commodo ut nibh non, sodales sodales erat.</a>
      @element '#sidebar' {
        #sidebarToggle, #sidebar { display:none }
        #sidebar { position: absolute; top: 0; right: 0; height: 100%; background: #ccc; color: #333; padding: 15px; height: 100%; }
        #sidebar aside + aside { border-top: 1px solid #bbb; margin-top: 10px; padding-top: 10px; }
        #sidebar h3 { font-size: 150%; text-transform: uppercase; margin: 0 0 .5em 0; color: #333; font-weight: 300; }
        #sidebar .newsletter form { width: 100%; }
        #sidebar form input { -webkit-appearance: none; appearance: none; background: #eee;  display: block; border: 1px solid #999; border-radius: 3px; width: 100%; padding: 8px; font-size: 100%; margin-top: 5px; }
        #sidebar form input[type="email"]:focus { border-color:  #f50; }
        #sidebar form input[type="submit"] { cursor: pointer; background: #f90; border-color: #f50; color: #f30; font-weight: 600; }
        #sidebar form input[type="submit"]:hover { background: #fc0; border-color: #f70; color: #f50; }
        #sidebar .recent-posts a { display: block; text-decoration: none; color: #666; margin: 0 0 15px 0; font-size: 90%; line-height: 1.3; }
        #sidebar .recent-posts a:hover { color: #333 }
      @element 'main' and (max-width: 499px) {
        #sidebarToggle:checked + main #sidebar { display:block; width: 50%; float: right; }
        #sidebarToggle:checked ~ main { padding-right: 52%; }
      @element 'main' and (min-width: 500px) {
        #sidebarToggle:checked + main #sidebar { display:block; width: 31%; float: right; }
        #sidebarToggle:checked ~ main { padding-right: 33%; }

  <!-- Intro -->
  <section id=intro>
    <p>Integer vitae quam id sapien luctus tincidunt a at turpis. Praesent scelerisque tincidunt sapien, quis consectetur metus dapibus eu. Aliquam eu risus purus. Mauris eros turpis, elementum laoreet luctus eget, iaculis eget libero. Phasellus tincidunt rhoncus mauris in euismod</p>
    <p>Duis pretium dolor eget tellus vehicula, vitae bibendum nisi suscipit. Fusce dui velit, accumsan sit amet erat quis, mollis finibus lectus. Curabitur vel nulla ut lacus aliquam convallis. Fusce tincidunt, quam ut varius dictum, quam dolor fermentum augue, pulvinar tincidunt erat diam et velit. Fusce varius iaculis tempor. Integer sagittis vulputate sollicitudin. Praesent dapibus augue libero, ultricies sagittis felis mattis tincidunt.</p>
      @element '#intro' {
        #intro p:first-of-type {font-size: 140%; }
        #intro p { color: #555; font-weight: 400; font-size: 120%; }

  <!-- Content -->
  <section id=content>
    <h2>Page Content Headline</h2>
    <aside>Written by <strong>Default Author</strong> on <strong>January 1st</strong></aside>
      <p>Nulla non nisl suscipit, maximus odio eget, varius magna. Pellentesque habitant morbi tristique senectus et netus et malesuada fames ac turpis egestas. Sed blandit tellus in tortor vestibulum, in euismod augue lacinia. Ut quis felis sit amet mi vehicula mattis. Aliquam at purus non velit mattis gravida lacinia quis velit. Nunc hendrerit leo eget erat iaculis, non porttitor tellus auctor. Donec blandit ipsum vitae velit consectetur porttitor. Etiam tristique congue convallis. Sed lacus diam, commodo eget ornare sit amet, molestie nec lorem. Vestibulum quis semper orci. Etiam id nisl justo. Quisque molestie, nulla non lobortis sodales, mi sapien ultricies arcu, facilisis faucibus urna lacus a ligula. In turpis orci, eleifend et risus vel, pharetra molestie velit. Sed pellentesque augue in est cursus, sed congue tellus fringilla. Praesent eu orci eget augue congue interdum.</p><p>Maecenas dapibus risus ut enim egestas porttitor. Donec et est pulvinar, aliquet massa sed, vehicula metus. Nam sed auctor mi, id venenatis nulla. Mauris feugiat ultrices nunc, imperdiet sollicitudin odio tempus sed. Curabitur volutpat, mi et cursus lobortis, metus lorem consectetur nisl, sit amet aliquet lectus nisi vel turpis. Proin nec vehicula neque. Maecenas elit leo, feugiat sit amet turpis id, dictum efficitur nisl. Vivamus eu turpis in quam vulputate volutpat vitae id metus. In lectus felis, venenatis vel vestibulum ut, suscipit eu ipsum. Vestibulum pretium nec diam non iaculis. Interdum et malesuada fames ac ante ipsum primis in faucibus. Sed quam augue, laoreet quis sem a, vestibulum laoreet est. Praesent molestie dolor sagittis, cursus turpis nec, laoreet mi.</p>
      @element '#content' {
        #content h2 { font-size: 250%; margin: 0; letter-spacing: -.05em; }
        #content aside { font-size: 90%; color: #555; margin: .25em -0; }
        #content p { font-size: 120%; color: #333; }

  <!-- Bottom -->
  <section id=bottom>
      <h3>Widget Title</h3>
      <div>Nulla non nisl suscipit, maximus odio eget!</div>
      <img src=//placehold.it/250x250/333/999&text=%20>
      <h3>Other Widget</h3>
      <div>Maecenas dapibus risus ut enim egestas porttitor. Donec et est pulvinar, aliquet massa sed, vehicula metus.</div>
      <img src=//placehold.it/250x250/999/333&text=%20>
      @element '#bottom' {
        #bottom aside { display: block; padding: 10px; position: relative; color: #fff; float: left; width: 100%; overflow: hidden; min-height: 100px; margin: 15px 0 0 0;}
        #bottom aside img { position: absolute; top: 0; left: 0; width: 100%; height: auto; z-index: 250; }
        #bottom h3 { position: relative; z-index: 500; margin: 0; }
        #bottom div { position: relative; z-index: 700; }
      @element '#bottom' and (min-width: 500px) {
        #bottom { margin-top: 15px; }
        #bottom aside { width: 49%; margin-top: 0; }
        #bottom aside + aside { margin-left: 2%; }


<!-- Footer -->
<section id=footer>
  <input id=col1 type=checkbox><label for=col1><span>Column 1</span>
    <div>Curabitur dictum nibh risus, ac semper sem ornare eu. Nullam vestibulum sed est non porta.</div>
  <input id=col2 type=checkbox><label for=col2><span>Column 2</span>
    <div>Curabitur scelerisque id eros a pulvinar. Curabitur vitae aliquam dui, accumsan mattis augue. Phasellus commodo elit maximus justo condimentum.</div>
  <input id=col3 type=checkbox><label for=col3><span>Column 3</span>
    <div>Id ultrices orci placerat. Pellentesque id finibus magna. Suspendisse lacinia sapien dui, vitae finibus metus eleifend ut. Integer elit ipsum</div>
  <input id=col4 type=checkbox><label for=col4><span>Column 4</span>
    <div>Etiam sagittis non tortor eget tempus. Curabitur fermentum quam ut erat lacinia varius. Donec in sagittis magna. Nullam eu consequat ligula. Morbi bibendum vestibulum ipsum. Aenean imperdiet leo at nulla molestie cursus.</div>
  <input id=col5 type=checkbox><label for=col5><span>Column 5</span>
    <div>Morbi metus dolor, dignissim sed imperdiet quis, venenatis a lectus. Praesent libero quam, aliquam ac turpis quis, aliquam congue magna.</div>
    @element '#footer' {
      #footer { background: #111; color: #555; font-weight: 400; padding: 15px; }
      #footer label { color: #555; cursor: default; }
      #footer label span { cursor: pointer; }
      #footer input[type=checkbox], #footer label div { display: none; }
      #footer input[type=checkbox]:checked + label span { color: #777; }
      #footer input[type=checkbox]:checked + label div { display: block; cursor: text; }
      #footer label { width: 100%; padding: 5px;}
      #footer label span { font-weight: 700; font-size: 150%; text-align: center; display: block; }
      #footer:after { content: 'Copyright © 2015 Company Name'; display: block; width: 100%; padding-top: 15px; float: left; text-align: center; }
    @element '#footer' and (min-width: 500px) {
      #footer label { width: 20%; float: left; padding-bottom: 15px; text-align: left; pointer-events: none; }
      #footer label span { font-size: 125%; text-align: left; cursor: default; }
      #footer label div { display: block; }
      #footer label small { display: block; width: 100%; float: right; }
      #footer input[type="checkbox"] + label span { color: #777; }
              html {
  opacity: 0;
.delay-one {
  -webkit-animation-delay: 1s; animation-delay: 1s;
.delay-onefifty {
  -webkit-animation-delay: 1.5s; animation-delay: 1.5s;
.delay-twofifty {
  -webkit-animation-delay: 2.5s; animation-delay: 2.5s; }
@element 'html' {
  * {
    outline: none;
    box-sizing: border-box;
    -moz-box-sizing: border-box;
    text-rendering: optimizeLegibility;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    font-kerning: auto;
  html {
    opacity: 1 !important;
    font-size: 10pt;
    line-height: 1.4;
    font-family: 'Open Sans', Roboto, 'Helvetica Neue', 'Myriad Pro', 'Segoe UI', Arial, sans-serif;
    -webkit-text-size-adjust: 100%;
  body {
    margin: 0;
  p {
    margin: 0 0 .6em 0;
  label {
  section, main {
    width: 100%;
    float: left;
    overflow: hidden;
    position: relative;
  main { 
    padding: 15px 2% 2% 2%;
🕑 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 ..................