I want a CSS solution (in principle HTML5/CSS3) that would reproduce the behaviour of the following table-based layout:
<table width="80%" align="center" border="1">
<tr valign="top">
<td>Some content that varies in size</td>
<td width="200">Maybe an image, maybe some short text</td>
</tr>
</table>
My best attempt with CSS gets me the left-side contents (the "content that varies in size" above) to wrap around the div on the right.
Here's what I'm trying:
div.outsidecontainer {
position: relative;
width: 80%;
border: 1px solid silver;
margin-left: auto;
margin-right: auto;
}
div.absolute {
float: right;
width: 200px;
margin-bottom: 1px;
border: 1px solid silver;
}
div.filler {
border: 1px solid silver;
margin-bottom: 1px;
}
<div class="outsidecontainer">
<div class="absolute">This is the fixed-size div on the right</div>
<div class="filler">Another div element with a lot of text .....</div>
</div>
Any suggestions?