Create three columns with vertical rule using border - HTML CSS CSS Layout

HTML CSS examples for CSS Layout:3 Column

Description

Create three columns with vertical rule using border

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">
.one_third {<!--  w ww .  j a v a 2  s. co  m-->
   display:inline-block;
   padding:0px 21px;
}

.one_third:nth-child(1) {
   border-right:2px solid Chartreuse;
}

.one_third:nth-child(3) {
   border-left:2px solid yellow;
}
</style> 
 </head> 
 <body> 
  <div align="center"> 
   <div class="one_third"> 
    <span style="font-size: 24px;">test test test</span> 
    <p></p> 
    <p style="line-height: 1.4em;"> <span style="font-size: 13px;"> test <br> test <br> <a href=""> Learn more <i class="icon-play" style="font-size: 10px;"></i> </a> </span> </p> 
   </div> 
   <div class="one_third"> 
    <span style="font-size: 24px;"> test <br> </span> 
    <p></p> 
    <p style="line-height: 1.4em;"> <span style="font-size: 13px; font-family: Antic Slab;"> test <br> test <br> <a href=""> Learn More <i class="icon-play" style="font-size: 10px;"></i> </a> </span> </p> 
   </div> 
   <div class="one_third last"> 
    <p> <span style="font-size: 24px;">test</span> </p> 
    <p style="line-height: 1.4em;"> <span style="font-size: 13px; font-family: Antic Slab;"> test <br> test <br> <a href=""> Learn More <i class="icon-play" style="font-size: 10px;"></i> </a> </span> </p> 
   </div> 
   <div class="clearboth"></div> 
  </div>  
 </body>
</html>

Related Tutorials