View Full Version : Making a Still Background even when scrolling down.
08-11-2010, 09:31 PM
EXAMPLE: WWW.FARMERSALMANAC.COM (http://FARMERSALMANAC.COM)
The background doesnt move- I want that for my website.
I found my three main sources that I will probably need to edit for this to happen:
08-11-2010, 10:36 PM
Take a look at http://www.elated.com/articles/controlling-background-images-and-colours/
08-11-2010, 10:53 PM
More specifically, the background-attachment CSS property.
08-12-2010, 08:56 AM
For the body tag example:
margin: 0 auto;
background: #fff url(image_name.jpg) no-repeat center scroll;
That is the proper CSS code for a non-tiled image where the contents scroll with the background image. Change "#fff" to preferred bg color. Change "scroll" to "fixed" if you want page contents to scroll over bg image. Be sure to set proper width/height to provide minimum page size to display bg image. Put the CSS as is on an external CSS file. If using embedded CSS, then place CSS between the style tags and place those style tags between the head tags of the page.
Powered by vBulletin® Version 4.2.2 Copyright © 2016 vBulletin Solutions, Inc. All rights reserved.