vdelricco
vdelricco

Reputation: 303

android app created using phonegap - background doesn't stay fixed while scrolling

I have an android app that has has this css for the body background:

html, body {
height:100%
margin: 0;
padding: 0;
color: white;
position: static;
text-align:left;
background: URL(images/aVia_Background_new.png) top center black;
background-repeat:no-repeat;
background-size: cover;
background-attachment:fixed !important;
}

When the page is long enough to be scrolled, the background will scroll right off the screen as the page is traversed downward. It acts as though the background-attachment property is set to scroll, but it certainly isn't. The background works properly when the website is viewed in Google Chrome on my desktop, but for some reason when it's translated to Android via Phonegap, it doesn't work properly. Is this a known issue with Phonegap? And does anyone know anything I could try to remedy this? Thanks to any responses. The more ideas the better.

Upvotes: 2

Views: 1240

Answers (1)

Prasad
Prasad

Reputation: 701

yes.. the problem is with your `background-attachment:fixed; As far as I know position:fixed is not working fine. I had the same issue while I was trying to do a fixed header/footer in my app. And used iScroll at last

Upvotes: 1

Related Questions