Responsive centered row with variable size outter-elements - HTML CSS CSS Layout

HTML CSS examples for CSS Layout:Responsive Layout

Description

Responsive centered row with variable size outter-elements

Demo Code

ResultView the demo in separate window

<html>
 <head> 
  <title>Lorem ipsum dolor sit am</title> 
  <meta name="viewport" content="width=device-width, initial-scale=1"> 
  <style id="compiled-css" type="text/css">
div.block {<!--   w w  w.  ja v a 2s. c  o  m-->
   width:33%;
   height:51px;
   border:2px solid Chartreuse;
   float:left;
   margin:3px;
}

div.block-2 {
   width:32%;
   height:51px;
   float:left;
   border:2px solid yellow;
   margin:3px;
}

div.margin-l {
   margin-left:51px;
}

div.section-2 {
   margin:0 auto;
   width:61%;
}
</style> 
 </head> 
 <body> 
  <section class="tri-element-rows"> 
   <div class="block"> 
   </div> 
   <div class="block"> 
   </div> 
   <div class="block"> 
   </div> 
   <div class="section-2"> 
    <div class="block-2 "> 
    </div> 
    <div class="block-2"> 
    </div> 
    <div class="block-2"> 
    </div> 
   </div> 
  </section>  
 </body>
</html>

Related Tutorials