HTML CSS examples for CSS Layout:Layout
DIV on middle with vertical layout, div on left with horizontal layout
<html> <head> <meta name="viewport" content="width=device-width, initial-scale=1"> <style id="compiled-css" type="text/css"> div {<!-- ww w.j a va 2 s. c o m--> float:left; width:51px; height:51px; background-color:Chartreuse; margin:6px; } div:nth-child(odd) { clear:both; } </style> </head> <body> <div> Lorem </div> <div> Lorem </div> <div> Lorem i </div> <div> Lorem </div> </body> </html>