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?

Recommended Answers

All 3 Replies

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

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

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.

OK thanks!

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.