View Full Version : Background images that don't move
BigVikingAl
2006-02-23, 08:10 AM
I need to know how I can keep a background image stationary and appearing to always be in the same position as the page moves (scrolls down). I hope you know whayt I mean. An example can be found at http://www.mediajobsearchcanada.com
Ramster
2006-02-23, 08:49 AM
I do not know what you mean.
Are you talking about the maple leaf in behind that is scrolling?
Easiest thing to do usually is put it in a table and it will stay within the table. Or define the table height and make the image that height too.
Surfn
2006-02-23, 08:56 AM
I think he's talking about those crappy floating ads that move while you scroll. They are a java script but I can't think of any good list that would list a sub with one of those on there. I believe it was MaxCash that tried to get webmasters to use them several years ago.
HC-Majick
2006-02-23, 09:08 AM
if you mean the leaf background, use this in the stylesheet:
BODY
{
background-image : url(images/background.gif); <~~change this
background-position : center;
background-attachment : fixed;
background-repeat : no-repeat;
}
or if you are just using a simple returning background image:
<body background="image.gif" bgproperties="fixed">
BigVikingAl
2006-02-23, 05:35 PM
Thanks majick, that's it exactly. Works perfectly!
Be aware, not all browsers support the non-scrolling background attribute.
vBulletin® v3.8.1, Copyright ©2000-2026, Jelsoft Enterprises Ltd.