« Le langage CSS/Le modèle de boîte » : différence entre les versions

Contenu supprimé Contenu ajouté
Ligne 106 :
*: comportement hérité du parent.
 
=== ExemplesExemple ===
<source lang="css">
div.bigbox {
Ligne 124 :
</source>
 
HTML fragment:
<source lang="html4strict">
<div class="bigbox">
Ligne 132 ⟶ 131 :
</source>
 
Résultat :
 
<div style="width: 40em; border: 1em solid red; min-height: 5em;">
<div style="width: 50%; border: 1em solid; box-sizing: border-box; -webkit-box-sizing: border-box; -moz-box-sizing: border-box; border-color: green; float: left;">This should be on the left.</div>
<div style="width: 50%; border: 1em solid; box-sizing: border-box; -webkit-box-sizing: border-box; -moz-box-sizing: border-box; border-color: blue; float: left;">This should be on the right.</div>
Les deux boites sont côte-à-côte au-dessus du texte.
The two boxes should be above this text side by side if your browser supports <code>box-sizing</code>.
</div>