I have a simple layout with content floated-left and a fixed-positioned menu on the right. It works well for any of my pages that have enough content in the 'content' div so that the div grows to it's maximum width. However I have a couple pages that don't have enough text for the div to grow to its maximum size.
The HTML:
<div id="frame">
<div id="content">
<p>Content goes here</p>
</div>
<div id="menu">
<p>Menu goes here</p>
</div>
</div>
The CSS:
#frame {
position: absolute;
border:2px solid red;
}
#content {
border:1px dashed red;
float:left;
margin-right:15em;
}
#menu {
position:fixed;
border:1px dotted blue;
right:0;
width:13em;
}
I can force the div to use its maximum width by filling it with a bunch of
's however that's hardly the elegant solution. Is there a way to cause a nearly empty floated div to grow to its full size without resorting to a hack?