i want to have a centered background image vertically stretched over my website. Works perfectly while there is no scrollbar that's move my centered image, but leave my margin: 0 auto in place. Now my content doesn't line up with my background-image.
Html, Body
{
width: 100%;
height: 100%;
background: url('../Images/page-bgr-top.png')
center top repeat-x;
overflow: auto;
}
Body {
background: url('../Images/page-bgr-content.png')
center top repeat-y;
display: block;
overflow: scroll;
}
#Main-Page
{
width: 900px;
margin: 0 auto;
height: 100%;
display: none;
}
Tried a different solution by set the background-image
and overflow: auto
on #Main-Page
, too and get some nasty scrollbars right on my website.