I have a page which should have a "sidebar" to the left, and a "main"
block of content to the right. I want to represent each block as a
<div>, and I thought I could do this by having "float: left" on the
sidebar's CSS, and "float: right" on the main block's CSS.
Problem is, when I do it this way, the main block goes *under* the
sidebar, not beside it. I'm guessing this is because the main block
contains text and wants to be as wide as it can be.
I don't want to have to specify an exact width for the sidebar, so I
don't want to put "width: 150px" on the sidebar and "margin-left:
180px" on the main block. I want the sidebar to be as wide as it needs
to be, and then have the main block automatically fill up the rest of
the page's width. How do I do this?