Forums

The forums ran from 2008-2020 and are now closed and viewable here as an archive.

Home Forums CSS Stop background image from sliding horizontally with browser resize Re: Stop background image from sliding horizontally with browser resize

#114168
plaedien
Participant

ok i got it to stick to the container using a src image:

Code:

#container {
width: 960px;
padding: 0;
margin: auto;
position: relative;
z-index: 10;
}

#bg-pic-div {
width: 960px;
padding: 0;
margin: auto;

}

.bg-pic {
width: 478px;
height: 970px;
position: absolute;
margin-left: 750px;
}

Now the problem is the bamboo image is causing a horizontal scroll bar. Which means at smaller resolutions the whole site is now off centre….

live view: http://onthemend.com.au/test/