I need CSS help

galaxyAbstractor

Community Advocate
Community Support
Messages
5,508
Reaction score
35
Points
48
I have an image on my age as an background. I use this as the CSS code:
body {
background: #EEE url(img/bg.jpeg);
color: #444;
font: normal 62.5% "Lucida Sans Unicode",sans-serif;
margin: 0;
}

Now I want the image stay still at the background when you scroll so it should not duplicate itself. How do I do?? Example: The background here at this forum doesen't follow you scrolling so the darker line is always at the top. I want it to stay still so you always can see the darker lines.
 

shanes

New Member
Messages
35
Reaction score
0
Points
0
It layers itself because the image itself isn't big enough to cover the whole span area.
Use this instead:
Code:
background-attachment: URL HERE ;
background-color: #EEE ;
 
Last edited:

supajason

Member
Messages
288
Reaction score
2
Points
18
i think it should be:
Code:
background-image: url(img/bg.jpeg); 
background-attachment: fixed
 

galaxyAbstractor

Community Advocate
Community Support
Messages
5,508
Reaction score
35
Points
48
It almost worked. The image appered but it still repeat itself as before.
 

supajason

Member
Messages
288
Reaction score
2
Points
18
Hmmmm what size is the picture?


Code:
<style type="text/css">
body 
{
background-image: url('xxxxxxxxxxxx');
background-repeat: no-repeat;
background-attachment: fixed
}
</style>

i cant access your site to see?
 
Top