Home › Forums › CSS › Stop background image from sliding horizontally with browser resize › Re: Stop background image from sliding horizontally with browser resize
November 14, 2012 at 7:23 am
#114289
Participant
I couldnt deal with the scroll bar, so i ended up biting the bullet and doing a large background image which is mostly white – turns out it was only 10kb more than the bamboo by itself anyway – so what the hell. Found this code that makes it work perfectly:
html, body {
background: #fff url(images/background-bamboo-large.png) no-repeat center top;
padding: 0;
margin: 0;
width: 100%;
display: table;
height: 100%;
min-height: 100%;
font-family: sans-serif;
behavior: url(PIE.php);
}
thanks for your suggestions though :)