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>Elements with display:inline-block elements are like display:inline elements, 
   but they can have a width and height. Notice how the height will push the next inline element down. Try changing the 3 to a 2 on the next line. Can be unexpected. It will then continue tp push any other inline elements that bump into it. h + w wont apply... <span class="inline">display: inline - line break oddity</span> Integer nec odio. Praesent libero. Sed cursus ante dapibus diam.  Sed nisi. Nulla quis sem at nibh elementum imperdiet. Duis sagittis ipsum. Praesent mauris. <span class="inline-h-w">display:inline-block no line break oddity issues keeps wrapping inside the element, pushing everything around </span> tellus sed augue semper porta. Mauris massa. Vestibulum lacinia arcu eget nulla. Class aptent taciti sociosqu ad litora torquent per conubia nostra, per inceptos himenaeos. Curabitur sodales ligula in libero. Sed dignissim lacinia nunc. Curabitur tortor. <span class="inline-p">display:inline with padding </span> Pellentesque nibh. Aenean quam. In scelerisque sem at dolor. Maecenas mattis. Sed convallis tristique sem. Proin ut ligula vel nun.</div>
            
          
!
            
              body { 
  font: normal 1.2em/2em Arial; 
  background-color: #444;
  color: #ccc;
}
div  {
   background-color: #333;
   padding: 2em;
   position: absolute;
   top:50%;
   left:50%;
   margin-right: -50%;
   transform: translate(-50%, -50%);
   width: 33em;
}
/* Elements with display:inline-block elements are like display:inline elements, 
   but they can have a width and height. */
.inline {
  display: inline;
  background-color: #222;
  /* Notice how the height will push the next inline element down.
  Try changing the 3 to a 2 on the next line. Can be unexpected. 
  It will then continue tp push any other inline elements that 
  bump into it. */
  padding: 2em 3em;
/* h + w wont apply */
  opacity: .7;
}
.inline-h-w {
  display: inline-block;
  background-color: #111;
  /* inline-block with no h + w will act just like inline */
 // height: 4em;
  //width: 15em;
  text-align: center;
}
.inline-p {
  display: inline;
  background-color: #666;
/* padding does two notable things here, it pushes the inline 
  text to the border of it's width and it lines breaks and brings it's entire 
  surrounding box with it. */
  padding: 2em 4em;
  opacity: .7;
}
            
          
!
999px
Loading ..................

Console