HTML CSS examples for CSS Layout:2 Column
Two column div grid
<html> <head> <meta name="viewport" content="width=device-width, initial-scale=1"> <style id="compiled-css" type="text/css"> #container {<!-- w ww .jav a 2s . c o m--> width:500px; overflow:hidden; background-color:pink; display:inline-block; } .innerDiv { position:relative; float:left; width:40%; height:150px; margin-left:4%; margin-top:10px; background-color:yellow; } </style> </head> <body> <div id="container"> <div class="innerDiv"></div> <div class="innerDiv"></div> <div class="innerDiv"></div> <div class="innerDiv"></div> <div class="innerDiv"></div> <div class="innerDiv"></div> <div class="innerDiv"></div> <div class="innerDiv"></div> <div class="innerDiv"></div> <div class="innerDiv"></div> </div> </body> </html>