185 posts
  • Author had a Free File of the Month
  • Sold between 50 000 and 100 000 dollars
  • Has been a member for 1-2 years
  • Exclusive Author
  • Bought between 1 and 9 items
  • Europe
ikaruna says

Hello,

I have stumbled upon a bit of a problem, the background position fixed/cover is killing me (is not working properly on iOS devices), anyone knows a solution for this (without JS)?

Thank you!

1592 posts
  • Author had a Free File of the Month
  • Sold between 1 000 and 5 000 dollars
  • Exclusive Author
  • Has been a member for 1-2 years
  • Bought between 100 and 499 items
  • Referred between 1 and 9 users
  • Contributed a Blog Post
  • Contributed a Tutorial to a Tuts+ Site
  • Repeatedly Helped protect Envato Marketplaces against copyright violations
+5 more
SamBerson says

Hey there. What item are you requesting help about? Please contact the author directly so they can assist you.

185 posts
  • Author had a Free File of the Month
  • Sold between 50 000 and 100 000 dollars
  • Has been a member for 1-2 years
  • Exclusive Author
  • Bought between 1 and 9 items
  • Europe
ikaruna says

Hey there. What item are you requesting help about? Please contact the author directly so they can assist you.

:) , I’m not a buyer, I’m an author, I’m talking about my item, which I can not post here.

1592 posts
  • Author had a Free File of the Month
  • Sold between 1 000 and 5 000 dollars
  • Exclusive Author
  • Has been a member for 1-2 years
  • Bought between 100 and 499 items
  • Referred between 1 and 9 users
  • Contributed a Blog Post
  • Contributed a Tutorial to a Tuts+ Site
  • Repeatedly Helped protect Envato Marketplaces against copyright violations
+5 more
SamBerson says

Please email me with further details of your question, including a link to the item.

114 posts
  • Elite Author
  • Sold between 100 000 and 250 000 dollars
  • Exclusive Author
  • Bought between 100 and 499 items
  • Referred between 50 and 99 users
  • Most Wanted Bounty Winner
  • Microlancer Beta Tester
  • Has been a member for 2-3 years
nagaemas says

It seems your issue is a known, but not widely described issue about background-size cover and background-attachment: fixed on iOS. I’ve also experienced this the first time I created a one page theme, it happens on all mobile Safari/Chrome.

The viewport’s height unlike on desktop browsers is interpreted not as the visible part of your screen but the whole page itself. This makes your background-image stretch, having the same height as the height of your whole page, thus if you have a very long page, the image’s height will be the same as the height of your page.

It’s better to just set the background-attachment to scroll on iOS devices. This needs to be done via JS for detecting iOS, but a non-JS solution would be using media query to just set the background-attachment to scroll below a specific screen width.

Hope that helps.

by
by
by
by
by
by