Set border on the div with the greater height - HTML CSS CSS Widget

HTML CSS examples for CSS Widget:Div Border

Description

Set border on the div with the greater height

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{<!-- www . j ava 2s .c  o m-->
   overflow:hidden;
   background-color:red;
   width:350px;
}
.left, .right{
   padding: 3px;
   float: left;
   margin: 0;
   background-color:white;
   width: 150px;
}
.left{
   border-right:10px solid green;
}
.right {
   position:relative;
   left:-10px;
   border-left:10px solid blue;
}


      </style> 
 </head> 
 <body> 
  <div class="container"> 
   <div class="left">
     this is a test this is a test this is a test this is a test this is a test this is a test this is a test this is a test 
   </div> 
   <div class="right">
     this is a test this is a test this is a test this is a test this is a test this is a test this is a test this is a test this is a test this is a test 
   </div> 
  </div>  
 </body>
</html>

Related Tutorials