Home › Forums › CSS › How to allow a div with a bg-image to go negative left? › Re: How to allow a div with a bg-image to go negative left?
July 14, 2010 at 11:41 am
#79774
Participant
I think I’ve found the solution:
Here is the magic: min-width on body and html tag.
Code:
body{
font-family:Arial,Helvetica,sans-serif;
background:url(../images/background.jpg) no-repeat #000;
background-position: top center;
min-width:960px; /** <<<—– this ! **/
}
font-family:Arial,Helvetica,sans-serif;
background:url(../images/background.jpg) no-repeat #000;
background-position: top center;
min-width:960px; /** <<<—– this ! **/
}
html{
min-width:960px; /** <<<—– this ! **/
}
#content{
position:relative;
width:960px;
height:1126px;
margin:auto;
background:url(../images/bg.png) repeat-y;
}
You can see it there: