All Posts by Email, Once a Week

Media Temple logo

CSS-Tricks is brought to you in part by Media Temple, the web hosting that we both use and recommend.

Stationary Background when content scrolls

  • # October 13, 2008 at 11:00 pm

    I went to the 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: has some good info on that sort of thing.


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

You must be logged in to reply to this topic.

There's a whole bunch of content on CSS-Tricks.

Search for Stuff   •   Browse the Archives

Get the Newsletter ... or get the RSS feed