I believe you're gonna have to change the order for this, putting the sidebar first. Then, use CSS's float
property (without changing order, div#sidebar
would end up below the paragraphs vs next to them). div#sidebar
should stretch as needed for height.
CSS:
#sidebar {
float: right;
width: 50px;
}
HTML:
<body>
<div id="content">
<div id="sidebar">
/* has some form of fixed width */
</div>
<!-- paragraphs -->
</div>
</body>
@Jon Cram [comment]
Ok...nvm. You stated your own answer and rejected it at the same time.
You can't float an element around other elements that are defined before it. The browser has to be able to answer "float around what?" And it looks to the next element to start, continuing as far as necessary.