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.

            
              <div class="app">
  <div class="item one">item 1</div>
  <div class="item two">item 2</div>  
  <div class="item three">item 3</div>
  <div class="item four">item 4</div>
  
  <!--  add "gap" elements you can style  -->
  <div class="gap two"></div>
  <div class="gap three"></div>
  <div class="gap four"></div>
</div>
            
          
!
            
              .app {
  display: grid;
  grid-template-areas: "header header header"
                       "sidebar content content" 
                       "sidebar footer footer";
  grid-gap: 60px;
}

.item.one {
  grid-area: footer;
}

.item.two {
  grid-area: content;
}

.item.three {
  grid-area: sidebar;
}

.item.four {
  z-index: 1;
  grid-area: header;
}

.gap.four{
  height: 30px;
  background: red;
  
  /* make it 100% of the size of its grid cell */
  width: 100%;
  
  /* place it in the same grid area as another element */
  grid-area: header;
  
  /* move this item to the bottom of its grid cell */
  align-self: end;
  
  /* shift its position downward into the gap area */
  position: relative;
  /* 45 is half the gap size + half this styled thing's size */
  bottom: -45px;
}


.gap.two {
  height: 30px;
  background: red;
  width: 100%;
  grid-area: content;
  align-self: end;
  position: relative;
  bottom: -45px;
}

.gap.three {
  width: 30px;
  background: red;
  height: 100%;
  grid-area: sidebar;
  z-index: 2;
  justify-self: end;
  position: relative;
  right: -45px;
}
            
          
!
999px
Loading ..................

Console