I am trying to achieve a simple effect in HTML + CSS. Something like this
_____________________[ Some Div ]
Forgive the poor ASCII art. The ____
is to depict a border-bottom
. The Div to the right of it shouldn't have the border.
I want this border to stretch as much as possible, so that together they occupy the width of the parent. But for the life of me I can't figure out how.
I have tried:
Using a table with width:100%
. The extra space goes to the second td
instead of the first one
<table style="width:100%"><tbody><tr>
<td id="borderDiv"></td>
<td id="contentDiv">Some Div</td>
</tr><?tbody></table>
I have also tried floating the content div to the right:
<div>
<div id="contentDiv" style="float:right">Some Div</div>
<div id="borderDiv"></div>
</div>
But the div with the border now fills up the entire space of the parent. Couldn't figure out a way to constraint it to the leftover space.
I am trying to avoid any fixed spacing layout.