DIV on middle with vertical layout, div on left with horizontal layout - HTML CSS CSS Layout

HTML CSS examples for CSS Layout:Layout

Description

DIV on middle with vertical layout, div on left with horizontal layout

Demo Code

ResultView the demo in separate window

<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>

Related Tutorials