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.

            
              <div class="page">
  <div class="header">
    <div class="header__titlebar">
      <h3 class="header__titlebar__title">App Layout</h3>
    </div>
    <div class="header__menu"></div>
    <div class="header__menu"></div>
    <div class="header__menu"></div>
  </div>

  <div class="wrapper">
    <div class="sidebar">
      <div class="sidebar__menu">Menu</div>
      <div class="sidebar__menu">Menu</div>
      <div class="sidebar__menu">Menu</div>
      <div class="sidebar__menu">Menu</div>
      <div class="sidebar__menu">Menu</div>
    </div>

    <div class="main">
      <div class="main__stream">
        <div class="main__stream__content">This is some random text that will go into the first item of the first stream.</div>
        <div class="main__stream__content">This is some random text that will go into the second item of the first stream. This one will be longer, just to see how everything scales when we have longer content to account for.</div>
        <div class="main__stream__content">This is a much shorter block of text.</div>
      </div>
      <div class="main__stream">
        <div class="main__stream__content">The second stream has four items.</div>
        <div class="main__stream__content">They will have shorter blocks of text.</div>
        <div class="main__stream__content">However, the third block of text in the second stream will be longer than the other items in this stream, just to make it look interesting.</div>
        <div class="main__stream__content">This is the shortest.</div>
      </div>
      <div class="main__stream">
        <div class="main__stream__content">Since there are only two items in this last stream, I will add more text to it to give it more length. It will be longer than the other posts, especially the short posts in the second stream which contained the shortest text blocks. The third block was an exception.</div>
        <div class="main__stream__content">Since I already have one long item in this stream, I will end off with a shorter item.</div>
      </div>
    </div>
  </div>
</div>
            
          
!
            
              $menu-color: #333;
$title-color: #8DC63F;
$border-radius: 10px;
$default-spacing: 10px;
$small-screen: 400px;

.page {
  width: 100%;
  display: flex;
  flex-direction: column;
}

.header {
  width: 100%;
  height: 50px;
  background-color: white;
  display: flex;
  flex-shrink: 0;
  
  &__titlebar {
    width: 100%;
    height: 100%;
    border-radius: $border-radius;
    background-color: $title-color;
    display: flex;
    
    &__title {
      color: white;
      margin: auto;
      font-family: sans-serif;
      font-size: 24px;
      font-weight: normal;
      letter-spacing: 3px;
      
      // shrink text on smaller screens
      @media screen and (max-width: $small-screen) {
        font-size: 14px;
        letter-spacing: 1px;
      }
    }
  }
  
  &__menu {
    width: 50px;
    flex-shrink: 0;
    border-radius: 100%;
    background-color: $menu-color;
    margin-left: $default-spacing / 2;
  }
}

.wrapper {
  background-color: #FFF;
  display: flex;
  flex-direction: row;
  padding-top: $default-spacing;
}

.sidebar {
  width: 20%;
  background-color: $menu-color;
  border-radius: $border-radius;
  padding: $default-spacing 0;
  min-height: 325px;
  display: flex;
  flex-direction: column;
  flex-shrink: 0;
  
  &__menu {
    border: 1px solid white;
    color: #FFF;
    font-family: sans-serif;
    font-size: 14px;
    margin: auto $default-spacing;
    padding: $default-spacing * 1.25;
    border-radius: $border-radius;
    text-align: center;
    
    // shrink text on smaller screens
    @media screen and (max-width: $small-screen) {
      font-size: 4px;
    }
  }
}

.main {
  width: 100%;
  height: 100%;
  display: flex;
  flex-direction: row;
  
  &__stream {
    width: 100%;
    height: 100%;
    border: 1px solid white;
    padding-left: $default-spacing;

    &__content {
      color: #333;
      font-family: sans-serif;
      font-size: 14px;
      line-height: 1.25;
      padding: $default-spacing;
      background-color: #EEE;
      border-radius: $border-radius;
      margin-bottom: $default-spacing;
    }
    &:last-child {
      // hide last stream on smaller screens
      @media screen and (max-width: $small-screen) {
        display: none;
      }
    }
  }
}
            
          
!
999px
Loading ..................

Console