...

View Full Version : How do you split the background into two sections?



Apothem
11-08-2009, 06:41 PM
Example:
http://www.mybboard.net/assets/screenshots/forum_permissions.png

How do you make it so that one side is filled with one background color even if the other side has a larger height (without the use of background images)?

met
11-08-2009, 06:43 PM
#div { background-color:#f7f7f7; }

Excavator
11-08-2009, 06:48 PM
Hello Pykex,
Give your background color to a container div and nest your larger height div inside that.

Here's a simple example - http://nopeople.com/CSS/equal_length_columns/index.html

Apothem
11-08-2009, 10:14 PM
But what if both contents can be large than one another?
For instance, what if the right column was smaller than the left column as it has less content in it (and vice versa)?

Excavator
11-08-2009, 10:27 PM
That layout is kind of either/or. You have to know which column is going to be the longer one and make sure thats the column that is sizing the container.

You can make both columns match in height, no matter the content, by using faux columns. Google that or look at this example - http://nopeople.com/CSS/faux_columns/index.html



EZ Archive Ads Plugin for vBulletin Copyright 2006 Computer Help Forum