2 replies [Last post]
bigillz
Offline
newbie
Last seen: 16 years 6 weeks ago
Joined: 2005-05-02
Posts: 1
Points: 0

i have a page that's going to have a bunch of crap, tables, divs, etc centered on the page

for the background of the page, i want the left side (split at center) to be one color, the right side to be another color.

what's the best way to go about this?

i tried creating 2 absolutely positioned divs, both 50% width, 100% height, one red, one grey, one at left:0px, one at left:50%, both z-index/z-order 1. then i put <div id='leftside'></div><div id='rightside'></div> at the top of the page above my content, also tried it at the bottom, below. in both cases, the split colors display fine, but they display on top of anything else on the page, even when setting the z-order/z-index of the other content to something greater than 1

there is probably an easier way to do this that i'm not realizing. if anyone could help i'd be greatly appreciative.

thanks!

kira80
Offline
Enthusiast
Last seen: 14 years 33 weeks ago
Joined: 2005-04-06
Posts: 59
Points: 0

center-split background (image or non)

Maybe a 1600px * 1px gif with the left side of one color and the right side of the other, then you set that background to body and "background-position: center; background-repeat: repeat-y;" ? I think it is the easiest way...

roytheboy
roytheboy's picture
Offline
Guru
North Wales, UK
Last seen: 7 years 46 weeks ago
North Wales, UK
Timezone: GMT+1
Joined: 2004-09-18
Posts: 2233
Points: 41

center-split background (image or non)

Life's a b*tch and then you die!