Here is an example of what I think you're after:
Code structure like this:
<div class="container"> <div class="sidebar"> Sidebar content </div> <div class="content"> Content </div> </div>
Create a fixed space for the sidebar by adding a fixed
padding-left
value to.container
Set the sidebar width to the same value,
float
it left, and give it a negativemargin-left
of the same value
The sidebar will remain the same size and continue to fill the padding-left
of the container as the container resizes. The .content
will fill the remaining space within .container
, resizing as .container
resizes.