cssAudio - Activefile-genericCSS - ActiveGeneric - ActiveHTML - ActiveImage - ActiveJS - ActiveSVG - ActiveText - Activefile-genericVideo - Activehtmlicon-personicon-teamoctocatpop-outspinnerstartv

Pen Settings

CSS Base

Vendor Prefixing

Add External CSS

These stylesheets will be added in this order and before the code you write in the CSS editor. You can also add another Pen here, and it will pull the CSS from it. Try typing "font" or "ribbon" below.

Quick-add: + add another resource

Add External JavaScript

These scripts will run in this order and before the code in the JavaScript editor. You can also link to another Pen here, and it will run the JavaScript from it. Also try typing the name of any popular library.

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="wrapper">
  <div class="grid">
    <div class="sidebar">
      <p>Lorem ipsum dolor sit amet, consectetur adipisicing elit. Consectetur rerum, nulla ducimus deleniti veritatis. Autem placeat molestiae id maxime hic quia mollitia molestias vem. Perferendis reiciendis ex tempora, odio iure quibusdam ut consequuntur minima Porro consectetur rerum ipsum nulla aspernatur facilis eaque quis iste accusantium, ducimus ad incidunt quibusdam, numquam qui odit voluptates necessitatibus repudiandae hic veritatis, facere atque, corrupti expedita animi. Perferendis, omnis.Sint, ut minima, animi distinctio recusandae cumque! Veritatis ab eius, ad repudiandae eum dolorem sit.</p>
    </div>
    <div class="content">
      <p>Lorem ipsum dolor sit amet, consectetur adipisicing elit. Ipsum, fugit maiores optio dolore quos dolorum deserunt atque tempore rerum sunt vel quasi nisi aliquid aliquam inventore molestiae quidem ea eos!Illum eligendi error a libero necessitatibus, sapiente quia facere impedit, totam incidunt, maiores similique? Consectetur itaque, quod nam alias beatae aliquam animi ab molestias eveniet deserunt doloribus, ipsam culpa dicta. tempora atque facere incidunt quis quae, pariatur inventore, necessitatibus est deserunt. Est laborum atque provident, corrupti facere at repellendus repudiandae voluptates quo, voluptatem. Debitis, quae, nisi ? Rem, adipisci, aliquid. Aperiam iusto iure alias dolorem omnis corporis. Est nam maiores similique dolorum ad in distinctio a deleniti blanditiis, voluptate commodi inventore quidem aliquam  
        Excepturi voluptas distinctio in laudantium fugit reiciendis mollitia dolorum, a expedita? Iure repellendus alias fugiat eius dolor autem, obcaecati quisquam eum ducimus quaerat culpa, animi! Ad qui aperiam neque nihil. Sunt eaque quo sint, voluptatum nostrum incidunt atque, modi doloremque illum a praesentium illo ut tempora temporibus, quae beatae maiores cum placeat quisquam pariatur fuga expedita? Error aut ratione adipisci!</p>
    </div>
    <div class="ad">
      This is an ad
    </div>
    <div class="sidebar">
    <p>Lorem ipsum dolor sit amet, consectetur adipisicing elit. Non, libero obcaecati dolore officia suscipit ex, deserunt enim sit eligendi ipsam, quia corporis cumque tempora aliquid debitis perspiciatis, facilis numquam quas!</p></div>
    <div class="content">
      <p>Lorem ipsum dolor sit amet, consectetur adipisicing elit. Dignissimos cumque iste necessitatibus quasi, sapiente eos quod eligendi inventore eius nisi culpa error suscipit vel alias nostrum provident assumenda. Inventore, eum.</p>
    </div>
  </div>
</div>
            
          
!
            
              @import url('https://fonts.googleapis.com/css?family=PT+Sans');

.wrapper {
  font-family: 'PT Sans';
  display: flex;
  justify-content: center;
  border: 1px solid #ff4136;
  padding: 30px;
}

.grid {
  display: grid;
  border: 1px solid black;
  max-width: 800px;
  grid-template-columns: 4fr 8fr;
  grid-gap: 20px;
  padding: 30px;
  background-color: rgba(0, 0, 0, .05);
}

.ad {
  padding: 20px;
  grid-column-start: 1;
  grid-column-end: 3;
  grid-row-start: 2;
}

.content, .sidebar, .ad {
  font-size: 14px;
  border: 1px dotted #0074d9;
  background-color: rgba(#0074d9, .1);
}

p {
  padding: 0; margin: 0;
}

// Pseudos for demo purposes only

.wrapper,
.grid,
.sidebar,
.content,
.ad {
  position: relative;
}

.wrapper:after,
.grid:after, 
.sidebar:after, 
.content:after,
.ad:after {
  position: absolute;
  text-transform: uppercase;
  left: 0;
  top: 0;
  color: white;
  padding: 5px;
  font-size: 12px;
}

.grid:after {
  content: 'grid';
  background-color: #222;
}

.sidebar:after {
  content: 'sidebar';
  background-color: #0074d9;
}

.ad:after {
  content: 'ad';
  background-color: #0074d9;
}

.content:after {
  content: 'content';
  background-color: #0074d9;
}

.wrapper:after {
  content: 'wrapper';
  background-color: #ff4136;
}

            
          
!
999px
Close

Asset uploading is a PRO feature.

As a PRO member, you can drag-and-drop upload files here to use as resources. Images, Libraries, JSON data... anything you want. You can even edit them anytime, like any other code on CodePen.

Go PRO

Loading ..................

Console