Create 3 Responsive DIV Boxes Side by Side - HTML CSS CSS Layout

HTML CSS examples for CSS Layout:Responsive Layout

Description

Create 3 Responsive DIV Boxes Side by Side

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">
.box {<!--  w w w . ja  v  a 2  s .  c  om-->
   background-color:Chartreuse;
   width:31%;
   display:inline-block;
   margin:11px 0;
   border-radius:6px;
}

.text {
   padding:11px 0;
   color:yellow;
   font-weight:bold;
   text-align:center;
}

#container {
   white-space:nowrap;
   text-align:center;
}
</style> 
 </head> 
 <body> 
  <div id="container"> 
   <div class="box"> 
    <div class="text">
      Text 
    </div> 
   </div> 
   <div class="box"> 
    <div class="text">
      Text 
    </div> 
   </div> 
   <div class="box"> 
    <div class="text">
      Text 
    </div> 
   </div> 
  </div>  
 </body>
</html>

Related Tutorials