HTML CSS examples for CSS Layout:Column Layout
Floating a div column under another div column
<html> <head> <meta name="viewport" content="width=device-width, initial-scale=1"> <style id="compiled-css" type="text/css"> html, body{ height: 100%; width:100%; background-color:red; } #main-container{<!-- ww w. j a va2 s .com--> height:50%; width:100%; } #container1{ height:80%; width:20%; background-color:grey; float:left; } #container2{ height:90%; width:70%; background-color:blue; float:left; } a.34{ width:10%; float:left; } #container3{ height:60%; width:10%; background-color:green; float:left; } #container4{ height:20%; width:10%; background-color:yellow; float:left; } </style> </head> <body> <div id="main-container"> <div id="container1"> container 1 </div> <div id="container2"> container 2 </div> <div class="a34"> <div id="container3"> container-3 </div> <div id="container4"> container-4 </div> </div> </div> </body> </html>