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>
  <hgroup class="Container">
    <h1>Site Title</h1>
    <h2>Donec id elit non mi porta.</h2>
  </hgroup>
</header>

<main class="Container">
  <div class="Grid">
    <section class="Grid-cell">
      <h2>Heading</h2>
      <p>Donec id elit non mi porta gravida at eget metus. Fusce dapibus, tellus ac cursus commodo, tortor mauris condimentum nibh, ut fermentum massa justo sit amet risus. Etiam porta sem malesuada magna mollis euismod. Donec sed odio dui. </p>
      <a href="#">View details &raquo;</a>
    </section>
    <section class="Grid-cell">
      <h2>Heading</h2>
      <p>Donec id elit non mi porta gravida at eget metus. Fusce dapibus, tellus ac cursus commodo, tortor mauris condimentum nibh, ut fermentum massa justo sit amet risus. Etiam porta sem malesuada magna mollis euismod. Donec sed odio dui. </p>
      <a href="#">View details &raquo;</a>
   </section>
    <section class="Grid-cell">
      <h2>Heading</h2>
      <p>Donec sed odio dui. Cras justo odio, dapibus ac facilisis in, egestas eget quam. Vestibulum id ligula porta felis euismod semper. Fusce dapibus, tellus ac cursus commodo, tortor mauris condimentum nibh, ut fermentum massa justo sit amet risus.</p>
      <a href="#">View details &raquo;</a>
    </section>
  </div>
</main>

            
          
!
            
              :root { --gutter: 1.5em; }
@media (min-width: 30em) {
  :root { --gutter: 2em; }
}
@media (min-width: 48em) {
  :root { --gutter: 3em; }
}

.Container {
  margin: 0 auto;
  max-width: 60em;
  padding: var(--gutter);
}

.Grid {
  --gutterNegative: calc(-1 * var(--gutter));
  margin-left: var(--gutterNegative);
  margin-top: var(--gutterNegative);
}

.Grid-cell {
  margin-left: var(--gutter);
  margin-top: var(--gutter);
}

@media (min-width: 48em) {
  .Grid {
    display: flex;
  }
  .Grid-cell {
    flex: 1;
  }
}


/* The styles below aren't relevant to the demo. */

* {
  font: inherit;
  margin: 0;
  padding: 0;
}

body {
  color: #333;
  font: 1em/1.25 'Helvetica Neue', sans-serif;
}

header {
  background-color: hsl(30, 15%, 95%);
}

h1 {
  font-size: 3em;
  line-height: 1;
  margin: .25em 0;
}

@media (min-width: 48em) {
  h1 {
    font-size: 4em;
  }
}

h2 {
  font-size: 1.5em;
}

p {
  margin: 1em 0;
}

a {
  color: hsl(165, 60%, 40%);
}
            
          
!
            
              function supportsCSSCustomProperties() {
  var div = document.createElement('div');
  div.style.setProperty('--width', '1%');
  return div.style.getPropertyValue('--width') == '1%';
}

if (!supportsCSSCustomProperties()) {
  alert('Sorry! Your browser does not support CSS Custom Properties.');
}

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

Console