Pen Settings

HTML

CSS

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.

+ add another resource

JavaScript

Babel is required to process package imports. If you need a different preprocessor remove all packages first.

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.

+ add another resource

Behavior

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.

Format on Save

If enabled, your code will be formatted when you actively save your Pen. Note: your code becomes un-folded during formatting.

Editor Settings

Code Indentation

Want to change your Syntax Highlighting theme, Fonts and more?

Visit your global Editor Settings.

HTML

              
                <h2>Débordement de flottants</h2>
<div>
  <p class="float cellule">Lorem ipsum dolor sit amet  ipsum dolor sit adipisicing elit amet</p>
  Lorem ipsum dolor sit amet, consectetur adipisicing elit.
</div>

<hr class="clear" />

<div class="dib">
  <p class="float cellule">Lorem ipsum dolor sit amet, consectetuo laborum placeat soluta culpa.</p>
  le conteneur (div) a un <strong>display</strong>: inline-block / table / table-cell / table-caption
</div>


<hr class="clear" />

<div class="oa">
  <p class="float cellule">Lorem ipsum dolor sprit soluta culpa.</p>
  le conteneur (div) a un <strong>overflow</strong>: hidden / scroll / auto
</div>

<hr class="clear" />
<div class="pa">
  <p class="float cellule">Lorem ipsum dolor sit amet, ovidenta culpa.</p>
  le conteneur (div) a une <strong>position</strong> absolute / fixed
</div>

<br><br><br>
  
<hr class="clear" />
  <h2>Ecoulement autour d’un flottant</h2>
<div>
  <p class="float cellule">Lorem ipsum dolor sprovident vert.</p>
  <p>Lorem ipsum dolor sit amet, consectetur adipisicing elit. Quis ex ullam at veritatis quos provident fuga non accusantium itaque soluta numquam quasi animi architecto. Provident vero laborum placeat soluta culpa. Lorem animi architecto. Provident vero laborum placeat soluta culpa.</p>
</div>

<hr class="clear" />
<div class="">
  <p class="dib cellule vat">Lorem ipsum dolor sprovident.</p>
  <p class="dib colored vat largeur">
    Par défaut un <strong>white space</strong> se crée sur inline-bloc
    <br><br>
    Lorem ipsum dolor sit amet, consectetur adipisicing  placeat soluta culpa.</p>
</div>
  
<hr class="clear" />
<div class="dibws">
  <p class="dib ws cellule vat">Lorem ipsum dolor sprovident.</p>
  <p class="dib ws colored vat largeur">
    Ici le <strong>white-space</strong> est supprimé en définissant une police parente proche de zéro, mais pas tout à fait : ... 1px ! et la rétablissant ici dans l'enfant. <a href="http://www.alsacreations.com/astuce/lire/1432-display-inline-block-espaces-indesirables.html" target="_blank">Voir</a></p>
</div>
  
<hr class="clear" />
<h2>fusion de marges</h2>
<div class="border">
  <p class="colored mt">Le margin-top de cet enfant s'applique son parent (le div)</p>
  Lorem ipsum dolor sit amet, consectetur
</div>
              
            
!

CSS

              
                html {
	font-size: 62.5%;
}
body {
	background-color: #fff;
	color: #000;
	font-family: helvetica, arial, sans-serif;
	font-size: 1.2em;
	line-height: 1.5; /* adapt to your design */
}
a { font-weight: bold; color:#e02ae0; }
div { background:#43d3e6; padding:2px; width:520px }
p { margin:0; }
.p0 { padding:0 }
.float { float:left; }
.colored {background:#ebdf90}
.cellule { width:150px; background:#ccc; padding: 4px; }
.largeur { width:350px; }

.dib  { display:inline-block; }
.dt   { display:table;}
.dtc  { display:table-cell; }
.dtca { display:table-caption; }
.vat { vertical-align: top; }

.dibws { font-size: 1px; letter-spacing: -1px; }
.ws { font-size: 1.2rem; letter-spacing: normal }

.pa { position:absolute; }
.pf { position:fixed; }

.oh { overflow:hidden; }
.os { overflow:scroll; }
.oa { overflow:auto; }

.mt { margin-top:20px}

.clear {clear:both; }
h2 {margin:3px 0 }
.border { border:1px solid #000}
              
            
!

JS

              
                
              
            
!
999px

Console