I am trying to create a 2 column layout where the right side div is a fixed width and its content is always aligned with the bottom of the left side div, and the right side of the window. The left side div can grow/shrink in height/width according to the content and the remaining width of the window.
This is fairly simple using a table layout:
<table>
<tr>
<td class="left">
<span>Dynamic text Dynamic text Dynamic text Dynamic text Dynamic text Dynamic text Dynamic text Dynamic text Dynamic text Dynamic text Dynamic text Dynamic text Dynamic text Dynamic text Dynamic text Dynamic text Dynamic text Dynamic text Dynamic text Dynamic text Dynamic text Dynamic text</span>
</td>
<td class="right">
<span>Fixed text</span><br/><span>Fixed text</span>
</td>
</tr>
</table>
<style>
table {
border-collapse: collapse;
}
.left {
background-color: green;
}
.right {
width: 80px;
text-align: center;
vertical-align: bottom;
background-color: red;
}
</style>
However I can not find a way to do this with a div based layout. Is this possible, or is a table layout actually preferable in this case?