Exécuter
❯
Exécuter le code
Ctrl+Alt+R
Enregistrer le code
Ctrl+Alt+A
Changer d'orientation
Ctrl+Alt+O
Changer de thème
Ctrl+Alt+D
<!DOCTYPE html> <html> <head> <style> * { box-sizing: border-box; } .box { flottant: gauche; largeur: 33.33%; padding: 50px; } .clearfix::after { contenu: ""; clair: les deux; afficher: table; } </style> </head> <body> <h2>Grille de Boîtes</h2> <p>Float boxes côte à côte :</p> <div class="clearfix"> <div class="box" style="background-color:#bbb"> <p>Certain texte à l'intérieur de la boîte.</p> </div> <div class="box" style="background-color:#ccc"> <p>Certain texte à l'intérieur de la boîte.</p> </div> <div class="box" style="background-color:#ddd"> <p>Certain texte à l'intérieur de la boîte.</p> </div> </div> <p><strong>Remarque :</strong> Here, we use the clearfix hack to take care of the layout flow. We also use the box-sizing property to make sure that the box doesn't break due to extra padding. Try to remove this code to see the effect.</p> </body> </html>