HTML CSS examples for CSS Layout:Parent Container
Aligning Div Blocks in a container horizontally
<html> <head> <meta name="viewport" content="width=device-width, initial-scale=1"> <style id="compiled-css" type="text/css"> .container {<!--from w w w . ja va2 s .c om--> margin:16px; } .box { min-height:100px; float:left; width:24%; margin:0 2%; background-color:Chartreuse; } </style> </head> <body> <div class="wrapper"> <div class="container"> <div class="1 box"></div> <div class="2 box"></div> <div class="3 box"></div> <div class="4 box"></div> </div> </div> </body> </html>