Grow your CSS skills. Land your dream job.

Stationary Background when content scrolls

  • # October 13, 2008 at 11:00 pm

    I went to the wmd-editor.com website and was wondering how they kept the background image stationary when everythilng else scrolls with the browser scroll bar. Anyone know how they do that?

    # October 14, 2008 at 1:43 am

    BODY { background-image: url(‘bg.gif’); background-attachment: fixed; }

    or shorthand

    BODY { background: #000000 url(‘bg.gif’) repeat fixed top left; }

    w3schools:
    http://www.w3schools.com/css/css_background.asp has some good info on that sort of thing.

    Cheers

Viewing 2 posts - 1 through 2 (of 2 total)

You must be logged in to reply to this topic.

*May or may not contain any actual "CSS" or "Tricks".