HTML CSS examples for CSS Widget:Grid
Place the two grid near each other
<html> <head> <meta name="viewport" content="width=device-width, initial-scale=1.0"> <style> * {<!--from w ww . jav a 2 s . c o m--> box-sizing:border-box; } .row::after { content:""; clear:both; display:table; } [class*="col-"] { float:left; padding:16px; } body { font-family:"Lucida Sans", sans-serif; } .header { width:auto; background-color:Chartreuse; color:yellow; padding:16px; } .menu ul { list-style-type:none; margin:0; padding:0; } .menu li { padding:9px; margin-bottom:8px; background-color:blue; color:pink; box-shadow:0 2px 4px OrangeRed, 0 2px 3px rgba(0,0,0,0.25); } .menu li:hover { background-color:grey; } .sections { width:51%; float:left; } .whole { float:left; } @media only screen and (min-width: 600px) { .col-3 { width:16%; } .col-6 { width:21%; } } </style> </head> <body> <div class="whole"> <div class="sections"> <div class="header"> <h1>Lorem </h1> </div> <div class="row"> <div class="col-3 menu"> <ul> <li>Lorem ipsu</li> <li>Lorem ip</li> <li>Lorem ipsu</li> <li>Lorem ip</li> </ul> </div> <div class="col-6"> <h1>Lorem ip</h1> <p>Lorem ipsum dolor sit amet, consectetur adipiscing elit. Morbi ullamcorper molestie lacus sed fermentum. Aliquam erat volutpat. Vestibulum</p> </div> </div> </div> <div class="sections"> <div class="header"> <h1>Lorem </h1> </div> <div class="row"> <div class="col-3 menu"> <ul> <li>Lorem ipsu</li> <li>Lorem ip</li> <li>Lorem ipsu</li> <li>Lorem ip</li> </ul> </div> <div class="col-6"> <h1>Lorem ip</h1> <p>Lorem ipsum dolor sit amet, consectetur adipiscing elit. Morbi ullamcorper molestie lacus sed fermentum. Aliquam erat volutpat. Vestibulum</p> </div> </div> </div> </div> </body> </html>