As I work on developing my custom theme for Drupal, I am seeking a solution that will allow the content width to adjust depending on the presence of a sidebar. When there is no sidebar, I want the content width to be 100%, and when a sidebar is present, I would like the content to shrink horizontally to accommodate it. Below is an example of the structure:
<div id='container'>
<div id='content'></div>
<div id='sidebar'></div>
</div>
Up until now, my progress has been limited to achieving the layout shown in the rightmost image, where the content wraps around the sidebar.
I would greatly prefer to accomplish this using only CSS.