cssAudio - Activefile-genericCSS - ActiveGeneric - ActiveHTML - ActiveImage - ActiveJS - ActiveSVG - ActiveText - Activefile-genericVideo - ActiveLovehtmlicon-new-collectionicon-personicon-teamlog-outoctocatpop-outspinnerstartv

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.

Quick-add: + add another resource

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.

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.

            
              <header class="header">
  <div>A header</div>
</header>

<main class="main">
  <div class="sidebar">
    <a href="">Some links</a>
    <a href="">Some links</a>
    <a href="">Some links</a>
  </div>    

  <div class="main-content">
    <p>A simple flexbox demo showcasing the order property to achieve source order independence for the classic <em>main content with sidebar</em> layout.</p>

    <p>Lorem ipsum dolor sit amet, consectetur adipisicing elit. Animi officiis dignissimos fugiat incidunt ullam optio tempora voluptatibus repudiandae harum repellendus a totam necessitatibus tenetur vero facere in suscipit ipsam provident.</p>
    <p>Lorem ipsum dolor sit amet, consectetur adipisicing elit. Perferendis asperiores molestias consequatur culpa aliquid quam aspernatur aut vero accusantium amet. Quo repudiandae voluptas harum fuga dolor facilis similique expedita nemo.</p>
  </div>

</main>

<footer class="footer">A footer</footer>

            
          
!
            
              /* tiny reset */
body {
  margin: 0;
  padding: 0;
}

p {
  margin: 0 0 10px 0;
}
/* end tiny reset */

body {
  font-family: "Open Sans", sans-serif;
}

.header, .footer {
  background: #eee;
  padding: 10px;
}

.main {
  display: flex;
  flex-direction: column;
}

.main-content, .sidebar {
  padding: 10px;
}

.sidebar {
  background: seagreen;
}

.sidebar a {
  color: #fff;
  display: block;
}

@media screen and (min-width: 600px) {
  .main {
    flex-direction: row;
  }

  .main-content {
    order: 1;
    flex: 1;
  }

  .sidebar {
    order: 2;
    width: 180px;
  }
}  	

            
          
!
999px
Loading ..................

Console