HTML CSS examples for CSS Layout:Box
Centering boxes in CSS
<html> <head> <meta name="viewport" content="width=device-width, initial-scale=1"> <style id="compiled-css" type="text/css"> #boxes {<!-- ww w .ja v a 2 s . c o m--> width:801px; background-color:Chartreuse; float:left; display:flex; justify-content:center; } #boxes .box { width:100px; height:100px; margin:11px; background-color:yellow; } </style> </head> <body> <div id="boxes"> <div class="box"> Lorem </div> <div class="box"> Lorem </div> <div class="box"> Lorem </div> </div> </body> </html>