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 delenuptates 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, sapient maiores similique dolorum ad in distinctio a deleniti blanditiis, voluptate commodi inventore quidem aliquam  
        Excepturi voluptas distinctio in laudantium fugit reicii 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;
  max-width: 800px;
  grid-template-columns: 1fr 2fr;
  grid-template-rows: 1fr 2fr 1fr;
  grid-gap: 20px;
  border: 1px solid black;
  padding: 30px;
  background-color: rgba(0, 0, 0, .05);
}

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

.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