CSS
-Tricks
treehouse :
what would you like to learn today?
Web Design
Web Development
iOS Development
Show search box
Search
Search in:
All
Articles
Forums
Snippets
Videos
✕
Home
Forums
Snippets
Gallery
Videos
Almanac
Demos
Lodge
Navigation 'n' Search
Forums
Illustration by Nick Sirotich
Forums
»
Other Discussions
Stationary Background when content scrolls
cmelliott
Permalink to comment
#
October 2008
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?
mikes
Permalink to comment
#
October 2008
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
Add a Comment
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