HTML CSS examples for CSS Widget:Div Border
Set border on the div with the greater height
<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>