1

I'm developing a mobile web page using jquery UI. I want to set a background that remains static even when the user scrolls down the page. So the background is always the same but the content of the page is scrolled.

I've been googling for a long period of time and I couldn't find anything that works... This link from StackOverflow is the most accurate but it's now working on the android browser (Jquery Mobile Android - Fixed full-screen background image?)

Any Idea how to make this?

Community
  • 1
  • 1
Andres
  • 11,439
  • 12
  • 48
  • 87

2 Answers2

0

Try putting the image as the background for a fixed-position full-size div.

You can then put all of your content in a full-sized fixed-position div that can scroll.

apparatix
  • 1,492
  • 7
  • 22
  • 37
0

So I guess none of the usual (below) works for you?

 <style>
 body{
 background-image:url('image.jpg');
 background-repeat:no-repeat;
 background-attachment:fixed;
 background-position:center top;
 background-size:auto;
 }</style>
John Citizen
  • 184
  • 1
  • 2
  • 10