HTML CSS examples for CSS Widget:Grid
align grids and margin to left and right edge equally
<html> <head> <meta name="viewport" content="width=device-width, initial-scale=1"> <style id="compiled-css" type="text/css"> .container {<!--from w ww. ja v a 2s .co m--> position:relative; width:601px; margin:0 auto; } .box { float:left; width:161px; height:81px; background:Chartreuse; margin:21px; } </style> </head> <body> <div class="container"> <div class="box"> Lorem i </div> <div class="box"> Lorem i </div> <div class="box"> Lorem i </div> <div class="box"> Lorem i </div> <div class="box"> Lorem i </div> </div> </body> </html>