create a 3 column responsive layout - HTML CSS CSS Layout

HTML CSS examples for CSS Layout:Responsive Layout

Description

create a 3 column responsive 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">
.container {<!--  w  ww.  jav a 2 s.com-->
   display:flex;
}

.section {
   flex:2;
   border:2px solid;
}

@media (max-width: 768px)  {
   .container {
      flex-direction:column;
   }

}
</style> 
 </head> 
 <body> 
  <div class="container"> 
   <div class="section">
     Lor 
   </div> 
   <div class="section">
     Lor 
   </div> 
   <div class="section">
     Lor 
   </div> 
  </div>  
 </body>
</html>

Related Tutorials