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

              
                <div class="wrap">
  <header>
    <h1>
      Fixed width and 100% height sidebar, all fluid
    </h1>
  </header>
  <section class="cf">
    <div class="article-wrap">
      <article>
        <p>
          <a href="http://clubmate.fi/100-height-columns-fixed-width-sidebar-pure-css-solutions-to-commons-fluid-layout-problems">You may wanna see this blogpost. </a>
          The sidebar stays fixed width, the margins stay fixed width and it's still fluid. Boom! 
        </p>
        <p>
          You can have as many of these a you like
        </p>
        <p> 
          Donec sed odio dui. Cras mattis consectetur purus sit amet fermentum. Praesent commodo cursus magna, vel scelerisque nisl consectetur et.
        </p>           
      </article>
      <article>
        <p>
          Cras mattis consectetur purus sit amet fermentum. Maecenas sed diam eget risus varius blandit sit amet non magna. Nulla vitae elit libero, a pharetra augue. Cum sociis natoque penatibus et magnis dis parturient montes, nascetur ridiculus mus.
        </p>
        <p> 
          Donec sed odio dui. Cras mattis consectetur purus sit amet fermentum. Praesent commodo cursus magna, vel scelerisque nisl consectetur et. Nullam id dolor id nibh ultricies vehicula ut id elit.
        </p>
      </article>
      <article class="last">
        <p>
          Cras mattis consectetur purus sit amet fermentum. Maecenas sed diam eget risus varius blandit sit amet non magna. Nulla vitae elit libero, a pharetra augue. Cum sociis natoque penatibus et magnis dis parturient montes, nascetur ridiculus mus.
        </p>
        <p> 
          Donec sed odio dui. Cras mattis consectetur purus sit amet fermentum. Praesent commodo cursus magna, vel scelerisque nisl consectetur et. Nullam id dolor id nibh ultricies vehicula ut id elit.
        </p>
      </article>
    </div>
    <aside class="sidebar cf">
      <h2>Sidebar</h2>
      <ul>
        <li>The sidebar</li>
        <li>
          is not 
        </li>
        <li>
          positioned absolutely
        </li>
        <li>
          so it has a height
        </li>
        <li>
          and is pushing 
        </li>
        <li>
          the <code>section</code> down
        </li>
        <li>
          as the content increses
        </li>
        <li>
          in it.
        </li>
        <li>Lorem.</li>
        <li>Cum.</li>
        <li>Enim!</li>
        <li>Reiciendis!</li>
        <li>Distinctio.</li>
        <li>Iste!</li>
        <li>Voluptates.</li>
        <li>Accusantium.</li>
        <li>Similique!</li>
        <li>Ullam.</li>
        <li>Ullam.</li>
        <li>Similique.</li>
        <li>Ut.</li>
        <li>Maiores.</li>
        <li>Voluptatem.</li>
        <li>Iusto.</li>
        <li>Fugiat.</li>
        <li>Quidem!</li>
        <li>Sed.</li>
        <li>Doloribus.</li>
      </ul>
    </aside>
  </section>
</div>
              
            
!

CSS

              
                @import "compass/css3";

// Vars
$sidebar-width: 200px;
$box-color: Pink;

// Cheese starts here
article,
section,
aside {
  box-sizing: border-box;
}
section {
  border-bottom: 20px solid $box-color;
  padding: 20px;
  background: $box-color;
  overflow: hidden;
}
.article-wrap {
  margin: 0 $sidebar-width 0 0;
}
article,
.sidebar {
  padding: 15px;
}
article {
  background: LightGoldenRodYellow;
  border-color: $box-color;
  border-style: solid;
  border-width: 0 20px 0 0;
  float: left;
  width: 33.33%;
}
.sidebar {
  background: Aquamarine;
  // Needs to be floated to have height, not absolutely positioned
  float: right;
  margin-bottom: -5000px; // 100% column height trick
  padding-bottom: 5000px; // 100% column height trick
  width: $sidebar-width;
}

// Style / Reset, ignore
body {
  padding: 20px;
}
h1,
h2,
p {
  margin: 0 0 20px 0;
}
h1 {
  font-size: 25px;
  a {
    color: #333;
  }
}
h2 {
  font-size: 20px;
}
ul {
  padding-left: 20px;
}
// Clrearfix
.cf {
  &:after {
    content: "";
    display: table;
    clear: both;
  }
}
              
            
!

JS

              
                
              
            
!
999px

Console