A matter of CSS

If the left column is of fixed width, the only css the central column needs is

Code:
#center 
{
width:auto;
margin-left:150px; /*or more if you want spacing between the divs*/
}

With that code, and that markup it behaves the same in every browser
This will help with bringing the central div to sit alongside the left div, but the central div will still fill the rest of the space to its right, pushing the ride div down beneath it.
 
At this stage in the build I'm not sure whether each page will definitely contain the right div. So far I have attempted to build the site to allow for either scenario, truly dynamic. It's not going to happen though.

From here on I'm going to construct each page as if it's a known that the page will either contain the right div or it will not. This will allow me to create 2 separate ids for the center div; one which accommodates the right div and one which does not. This means I can give an exact width value to each id.

I don't like admitting a compromise, but the limits of CSS have been reached.
 
The problem I'm now having is that because the divs are floating, the left and right divs aren't inheriting the height of the container div. This is a problem because the right div has a border-left applied to it. Obviously if the right div isn't at full height then the border won't be at full height either. Which means it stops half way down the container.

Is there a way I can get the right div to assume maximum height so that the border stretches to the bottom?

Another Paint illustration to demonstrate;

divso.jpg
 
Last edited:
Compromise and use http://www.alistapart.com/articles/fauxcolumns/ on your container div (and dynamically give it a different class depending on the number of columns that particular page has)? Or would that not work with your current design?

It might save you time in the future to take a hit now and do the HTML using One True Layout as per suarve's suggestion, but I appreciate that you might be quite a way through development already.

Edit: Whoops, shadow post.
 
vaultingSlinky, thanks for your time here. The project manager informed me on Friday that every page will now contain the right div, which makes things considerably easier.
 
Back
Top Bottom