Title: Covering background img and jquery localscroll
Tags: jquery;html;ios;css
Question: I'm using bootstrap for my website and got localscroll to work properly (I use the standard nav bar code). So far so good.
Next I wanted to implement a fullscreen background that works properly on desktops and mobile (iphone, android, etc). Background picture should cover the whole screen and should not move when user scrolls content of a page. The only solution I could find (after quite a long search) was this:
html {
background: url('images/ny-building-xs-optimized.jpg') no-repeat center center fixed !important;
background-size: cover !important;
height: 100%;
overflow: hidden;
body {
height: 100%;
overflow: scroll;
-webkit-overflow-scrolling: touch; /* smooth scrolling on ios */
This works great!
Now if I combine this fullscreen background css with localscroll. Localscroll stops working. Which is strange because I read somewhere that in order to get localscroll to work you need to set a height and set overflow to scroll. Both are set.
If I remove the overflow: hidden css from the html tag than localscroll works but the background does not work correctly on my iphone (it scrolls and gets enlarged to the full size of the content - instead of the viewport).
Does anyone have a solution in which the background picture works and localscroll keeps working?
Thanks!

Here is the accepted answer: I ended up using a seperated div for static background wich solved all my issues.
This however led to a new issue on mobile. See White area on fixed background when scrolling on ios


{'source': 'StackExchangeDataset', 'subset': 'stackoverflow.com', 'metadata': {'AnswerCount': 1, 'CommentCount': 0, 'ContentLicense': 'CC BY-SA 3.0', 'CreationDate': '2015:00:02/09/15', 'FavoriteCount': 1.0, 'PostTypeId': 1, 'Tags': '<jquery><html><ios><css>', 'Title': 'Covering background img and jquery localscroll', 'ViewCount': 33, 'id': 28418077, 'user_AboutMe': '<p>@ <a href="http://www.jaspershome.org" rel="nofollow">www.jaspershome.org</a></p>\n', 'user_AccountId': 17828.0, 'user_DisplayName': 'jzp74', 'user_Reputation': 617.0, 'user_Views': 98.0, 'user_id': 40323.0}}