Cascading style sheet for page background

Is it possible to set the background color of the page such that 50% of the page has one color and the other 50% has another color, the page color is partitioned vertically.

Please suggest ASAP

Who is Participating?
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

Not that I know of - but have you thought about using a graphic that is 2000 pixels wide (i.e. larger than screen), 1 pixel high, and color the first 400 pixels one color the rest the other. Can't be sure it is centered though. Another method would be to use a table that is 100% wide, and split 50/50 between two rows ... each has a different bgcolor.

Hope that helps.

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
Or you could use a 2000 pixel wide background again but in the style sheet set background-position: center. Have to watch out for Netscape though.
how about making a layer....

use a bit of javascript that finds the height and width of the page and sets it's width accordingly, than in that layer make a table with width=100%
make two table cells and give 1 the first color and the other the other color.

Also make the height of the table 100% and that should do it.. i think it's a much prettier solution for Your problem...
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
Web Languages and Standards

From novice to tech pro — start learning today.