I have the following HTML structure
<div id='parent'> <div id='child-1'>Some text goes here</div> <div id='child-2'>Different text goes here</div> <div class='clear'></div> </div>
I also have the following CSS
#parent { width: 800px; position: relative; } #child-1 { width: 500px; float: left; } #child-2 { width: 200px; float: left; } .clear { clear: both; }
Now the contents of the child DIVs ( child-1 and child-2 ) can be anything, so ultimately child-1 can have a higher height than child-2 , or child-2 can have a longer height than child-1 .
What I want to do is have a vertical line between child-1 and child-2 , and this line has a length of DIV, which is of great height. I tried the border for both DIVs (the right border for child-1 and the left border for child-2 ), but this is not a good idea, because the line will look thick when two DIVs touch each other, and then thin for the extended part.
How can i do this? I also like to use CSS only if possible, without jQuery and JavaScript. If you think you need additional DIVs, then this is normal.
Thank you
source share