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 id="page-header" role="banner">
  <h1>Nested Layouts with Less Divs</h1>
</header><!-- /header#page-header -->

<div id="main" role="main">
  <p>Cupcake ipsum dolor sit amet croissant gummies pie macaroon. Wafer brownie bonbon gummi bears pastry toffee. Unerdwear.com soufflé candy I love ice cream apple pie tart croissant. Jujubes marshmallow sugar plum cotton candy marzipan sweet gummi bears chocolate bar jelly-o. Bonbon pie lollipop cookie caramels ice cream liquorice. Apple pie chocolate bar cheesecake bonbon macaroon carrot cake. Sugar plum I love brownie powder dessert pudding gingerbread soufflé.</p>
</div><!-- /div#main -->

<footer id="page-footer">
  Lynn Wallenstein - <a href="http://www.lynn.io">www.Lynn.io</a>
</footer><!-- /footer#page-footer -->

              $nested-width-size: 800px;
$nested-margin: $nested-width-size / 2;

%nested {
  padding-left: -moz-calc(50% - #{$nested-margin});
  padding-left: -webkit-calc(50% - #{$nested-margin});
  padding-left: calc(50% - #{$nested-margin});
  padding-right: -moz-calc(50% - #{$nested-margin});
  padding-right: -webkit-calc(50% - #{$nested-margin});
  padding-right: calc(50% - #{$nested-margin});

#page-footer {
  @extend %nested;

#page-header {
  background-color: blue;
  color: white;
  padding-top: 20px;
  padding-bottom: 20px;
  h1 {
    margin: 0;
} // #page-header

#main {
  background-color: black;
  color: white;

  p {
    margin: 0;
    padding: 10px 0 10px 0;
} // #main

#page-footer {
  border-top: 1px solid gray;
  padding-top: 20px;
Loading ..................