Cascading Style Sheets (CSS); Backgrounds (part 1 of 2)
By Will Bontrager2003-10-10
Background Image Does Not Scroll When Web Page Scrolls
To make your background image stay in place while the web page contents are scrolled over the top, use this style:
<style type="text/css">
<!--
BODY {
background-image: url(image.jpg);
background-attachment: fixed;
}
-->
</style>
Tutorial Pages:
» Introduction
» Now, let's see what you can do with CSS!
» Background Color
» Tiled Image
» Image Not Repeated, With Exact Positioning
» Background Image Repeated Across the Top of the Web Page
» Background Image Repeated Along the Left of the Web Page
» Background Image Does Not Scroll When Web Page Scrolls
» An Application
Copyright 2004 Bontrager Connection, LLC
