Home › Forums › CSS › Splitting a background for wider screens › Re: Splitting a background for wider screens
July 1, 2010 at 7:24 pm
#79155
Member
Hey, a few suggestions:
1) Join the images in the middle and centre (guessing your UK if it’s late?) the image.
Code:
background: url(image/path/here.png) center top;
2) Create a div with the following styles:
Code:
{
width: 50%;
height: 100%;
margin-left: 50%;
background: your-second-background image for the right-hand side.
width: 50%;
height: 100%;
margin-left: 50%;
background: your-second-background image for the right-hand side.
}
and set the other image to be the background of the body. If you also set the two images to be "left top’ on the body and "right top" on the div, they’ll always join in the middle.
You’ll also need some other code to set z-index etc… as well.
Hope that helps,
Chris