Advertisement

05.10.2008 at 10:05AM PDT, ID: 23391815
[x]
Attachment Details

CSS: How to make a background color 'elastic'

Asked by michaelshavel in Cascading Style Sheets (CSS), Extensible HTML (XHTML)

Tags: css

Hi,
I'm pretty new to CSS.
I have a page with a menu bar off to the left. I currently have the height of the menu bar to 600px and I have a background color set on the menu bar (See code SNIP below).
The main area is off to the right of the menu bar. The content in the main area will grow (down) from time to time. When the content in the main area does grow, the background color of the left menu bar remains static at it's  500px.  I'd like to make the left menu bar background color dynamically grow/shrink as the main content area grows down/up.  
The page I'm working on was initially done using HTML tables so when the table grew -- the background color grew with it.
How can I accomplish this in CSS?

Thanks,
Mike
 Start Free Trial
1:
2:
3:
4:
5:
6:
7:
#leftmenu {
background-color: #d0cdaa;
height: 600px;
width: 160px;
margin: 0 614px 0 80px;  /*position of the vertical menu gold box */
float: left;
}
 
Keywords: CSS: How to make a background colo…
 
Loading Advertisement...
 
[+][-]05.10.2008 at 10:43AM PDT, ID: 21539904

At Experts Exchange, members can ask their questions to thousands of technology professionals, also known as Experts. Experts compete and collaborate to answer those questions by leaving comments like this one.

Start your 7-day free trial to view this Expert Comment or ask the Experts your question.

 
[+][-]05.10.2008 at 10:43AM PDT, ID: 21539905

At Experts Exchange, members can ask their questions to thousands of technology professionals, also known as Experts. Experts compete and collaborate to answer those questions by leaving comments like this one.

Start your 7-day free trial to view this Expert Comment or ask the Experts your question.

 
[+][-]05.10.2008 at 11:43AM PDT, ID: 21540120

Often, when Experts are collaborating with members who have asked questions, they will request additional information about the problem. Askers respond with an author comment like this one.

Start your 7-day free trial to view this Author Comment or ask the Experts your question.

 
[+][-]05.10.2008 at 12:12PM PDT, ID: 21540196

At Experts Exchange, members can ask their questions to thousands of technology professionals, also known as Experts. Experts compete and collaborate to answer those questions by leaving comments like this one.

Start your 7-day free trial to view this Expert Comment or ask the Experts your question.

 
[+][-]05.10.2008 at 12:36PM PDT, ID: 21540256

Often, when Experts are collaborating with members who have asked questions, they will request additional information about the problem. Askers respond with an author comment like this one.

Start your 7-day free trial to view this Author Comment or ask the Experts your question.

 
[+][-]05.10.2008 at 08:10PM PDT, ID: 21541347

Assisted solutions are selected by the member who asked the question as a comment that contributed to their question's solution.

Start your 7-day free trial to view this Assisted Solution or ask the Experts your question.

 
[+][-]05.11.2008 at 07:09AM PDT, ID: 21542485

View this solution now by starting your 7-day free trial. Setting up your free trial is quick, easy, and secure. We will return you to this solution, unlocked, when you're done.

 

About this solution

Zones: Cascading Style Sheets (CSS), Extensible HTML (XHTML)
Tags: css
Sign Up Now!
Solution Provided By: bluefezteam
Participating Experts: 3
Solution Grade: A
 
 
 
Loading Advertisement...
20080716-EE-VQP-32 / EE_QW_2_20070628