Forums

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

Home Forums CSS HELP!!! sliding background image

  • This topic is empty.
Viewing 3 posts - 1 through 3 (of 3 total)
  • Author
    Posts
  • #32292
    jesseatomic
    Member

    http://dierks.com/#home

    I am trying to accomplish the same effect as this background but don’t know how to get it done. The background slides with page and scroll bars dont appear until the content area width is reached.

    Can someone help me.

    #51697
    jesseatomic
    Member

    nevermind i found it…

    body{
    background-attachment: fixed;
    background-image: url(../images/bg.jpg);
    background-repeat: no-repeat;
    background-position: top;
    background-color: #000;
    }

    but if anybody has a more effective way please let me know.

    Jesse

    #51631
    DogsGhost
    Member

    Not really regarding your probelm per say, but a more effective way to write that with css short hand –
    body {
    background: #000 url(../images/bg.jpg) no-repeat fixed;
    }

    bg position is defaulted to 0 on the y-axis (top) so you don’t have to specify it.
    More info on shorthand: css tricks video on short hand css.

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