Home › Forums › CSS › Stop background image from sliding horizontally with browser resize › Re: Stop background image from sliding horizontally with browser resize
November 13, 2012 at 7:58 am
#114168
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/