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.

            
              <h1>1.float:left;</h1>
<div class="wrap wrap1">
<div class="box box1"></div>
<div class="box box1"></div>
</div>
<h1>2.display:inline-block;</h1>
<div class="wrap wrap2">
<div class="box box2"></div>
<div class="box box2"></div>
</div>
<h1>3.display:table;</h1>
<div class="wrap wrap3">
<div class="box box3"></div>
<div class="box box3"></div>
</div>
<h1>4.display:flex;</h1>
<div class="wrap wrap4">
<div class="box box4"></div>
<div class="box box4"></div>
</div>
<h1>5.display:grid;</h1>
<div class="wrap wrap5">
<div class="box box5"></div>
<div class="box box5"></div>
</div>
            
          
!
            
              .box {
  border: 1px solid #000;
  width: 100px;
  height: 100px;
}
.wrap1::after {
  clear: both;
  display: block;
  content: "";
}
.box1 {
  float: left;
}
.box1 + .box1 {
  margin-left: 20px;
} 
.wrap2 {
  font-size: 0;
}
.box2 {
  display: inline-block;
}
.box2 + .box2 {
  margin-left: 20px;
}
.wrap3 {
  display: table;
  border-collapse: separate;
  border-spacing: 20px 0;
  margin-left: -20px;
}
.box3 {
  display: table-cell;
}
.wrap4 {
  display: flex;
}
.box4 + .box4 {
  margin-left: 20px;
}
.wrap5 {
    display: grid;
    grid-template-rows: 100px 50px;
    grid-template-columns: 120px 1fr;  
}
            
          
!
999px
Loading ..................

Console