Forums

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

Home Forums CSS How to allow a div with a bg-image to go negative left?

  • This topic is empty.
Viewing 3 posts - 16 through 18 (of 18 total)
  • Author
    Posts
  • #79734
    TheDoc
    Member

    Is the 1% of users that could have a smaller resolution really worth it?

    #79774
    Amida
    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 ! **/
    }

    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:

    http://anju.be/test/solution/

    #79794
    TheDoc
    Member

    Just remember that IE6 and IE7 don’t support min-width.

Viewing 3 posts - 16 through 18 (of 18 total)
  • The forum ‘CSS’ is closed to new topics and replies.