Revenge of the Nerds: CSS

Revenge of the Nerds: CSS

I am perplexed by what can only be described as a CSS situation. I want a sidebar’s background color to extend the length of it’s container. Given the two conditions of content length (main content is longer than the sidebar or sidebar is longer than main content) I am stuck in a code freakout. I can tweak the code to get the page to look like I want for one condition, only to have the pages with the other condition look like stepchildren with a heroin problem.

To illustrate:
cssfigures_f01.gif

cssfigures_f02.gif

So. Is it even possible in CSS to have the sidebar colored and running the height of the container, regardless of which content area is longer?

The dilemma can also be seen here. There are advertising pages which have smaller main content areas and editorial pages with larger main content areas.

Must. Get. Sleep.