0

I've seen on a lot of sites that when you scroll down a text, the background image stays the same; If I scroll down the image stays on the place and the piece of text that can't fit on the image height is shown on a white background;

how can I make the image scroll down with the text?

3
Contributors
3
Replies
4
Views
7 Years
Discussion Span
Last Post by Kruptein
0

i think background-attachment is the style property you're looking for

<body style="background-image:url(image.jpg);background-attachment:fixed">

0

Scranton is correct. Go for shorthand though

background:#fff url(../images/myimage.jpg) no-repeat fixed;

Oh by the way, you must ensure your image is large enough or gradients into your default background colour or its just gonna look strange.

Edited by macneato: n/a

This question has already been answered. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.