cssAudio - Activefile-genericCSS - ActiveGeneric - ActiveHTML - ActiveImage - ActiveJS - ActiveSVG - ActiveText - Activefile-genericVideo - Activehtmlicon-personicon-teamoctocatspinnerstartv

Pen Settings

CSS Base

Vendor Prefixing

Add External CSS

These stylesheets will be added in this order and before the code you write in the CSS editor. You can also add another Pen here, and it will pull the CSS from it. Try typing "font" or "ribbon" below.

Quick-add: + add another resource

Add External JavaScript

These scripts will run in this order and before the code in the JavaScript editor. You can also link to another Pen here, and it will run the JavaScript from it. Also try typing the name of any popular library.

Quick-add: + add another resource

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.

            
              <div class="container">
<header>
  <nav>
    <ul>
      <li><a href="#">item</a></li>
      <li><a href="#">item</a></li>
      <li><a href="#">item</a></li>
      <li><a href="#">item</a></li>
      <li><a href="#">item</a></li>
    </ul>
  </nav>
</header>
  <section>
    <div class="main">
      <h1>Header App</h1>
      Lorem ipsum dolor sit amet, consectetur adipisicing elit. Praesentium tempora voluptatibus amet libero, nam velit placeat aut omnis eaque eius quaerat saepe, vero maiores. Optio sit obcaecati similique eos temporibus.
      
      <h3>working with flex box</h3>
      Lorem ipsum dolor sit amet, consectetur adipisicing elit. Veniam, et, facilis! Nemo consequuntur nesciunt, necessitatibus adipisci reiciendis sed debitis a minima inventore natus facilis modi, at dignissimos illum recusandae, ab.
    </div>
    <aside>
      <div class="side">
        <h2>Header Side</h2>
        Lorem ipsum dolor sit amet, consectetur adipisicing elit. Sint nobis odit qui! Blanditiis asperiores, laborum explicabo itaque aut esse accusantium.
      </div>
      <div class="side">
        <h2>Header Side</h2>
        Lorem ipsum dolor sit amet, consectetur adipisicing elit. Accusamus fugit provident reprehenderit, expedita consequuntur omnis laudantium.
      </div>
    </aside>
  </section>
</div>
            
          
!
            
              @import url('https://fonts.googleapis.com/css?family=Open+Sans');
$font: 'Open Sans', sans-serif;
$color: #ecf0f1;
$ground: #34495e;

.container{
  width: 80%;
  margin: 0 auto;
  font-family: $font;
  h1,h2,h3{ color: $ground; }
  header{
    nav{
      ul{
        display: flex;
        padding: 0;
        li{
          flex: 1 100%;
          list-style: none;
          a{
            padding: 2%;
            text-align: center;
            display: block;
            background: $ground;
            color: $color;
            text-decoration: none;
            border: 1px solid darken($ground, 10);
          }// a
        }// li
      } // ul
    }// nav
  }// header
  section{
    display: flex;
    flex-direction: row;
    .main{
      padding: 0.5%;
      flex: 2;
    }// main
    aside{
      padding: 0.5%;
      flex: 1;
    }
  }// section
} // container

@media screen and(max-width: 600px){
  .container{
    section{
      flex-direction: column;
      .main, aside{
        flex: 1;
      }
    }
  }
}
            
          
!
999px
Close

Asset uploading is a PRO feature.

As a PRO member, you can drag-and-drop upload files here to use as resources. Images, Libraries, JSON data... anything you want. You can even edit them anytime, like any other code on CodePen.

Go PRO

Loading ..................

Console