• Skip to main content
  • Skip to forum navigation

StudioPress

  • Shop for Themes
  • My StudioPress

Forum navigation

  • Home
  • General Genesis Discussions
  • StudioPress Themes
  • Genesis Blocks
    • Genesis Blocks
    • Genesis Custom Blocks
  • Retired Themes
  • FAQs
  • Forum Rules
  • Internationalization and Translations
  • Forum Bugs and Suggestions
  • Forum Log In

Are You Using The WordPress Block Editor?

Genesis now offers plugins that help you build better sites faster with the WordPress block editor (Gutenberg). Try the feature-rich free versions of each plugin for yourself!

Genesis Blocks Genesis Custom Blocks

Parallax Home Image not working on phones

Welcome!

These forums are for general discussion on WordPress and Genesis. Official support for StudioPress themes is offered exclusively at My StudioPress. Responses in this forum are not guaranteed. Please note that this forum will require a new username, separate from the one used for My.StudioPress.

Log In
Register Lost Password

Community Forums › Forums › Archived Forums › Design Tips and Tricks › Parallax Home Image not working on phones

This topic is: not resolved

Tagged: image size, parallax, responsiveness

  • This topic has 7 replies, 2 voices, and was last updated 7 years, 11 months ago by davidd.
Viewing 8 posts - 1 through 8 (of 8 total)
  • Author
    Posts
  • June 28, 2015 at 6:12 pm #157786
    davidd
    Member

    Hi,

    I spent a long time looking for a great theme for my client's website and found Parallax which works great, except for the main feature it's named after. I hope someone can help me with this. I have some great images for the website here using Parallax. The images weren't responding to changes in the width of the browser until changed background-size from auto to cover.

    .home-section-1,
    .home-section-3,
    .home-section-5 {
    	background-attachment: fixed;
    	background-color: #fff;
    	background-position: 50% 0px;
    	background-repeat: no-repeat;
    	-webkit-background-size: cover;
    	-moz-background-size: cover;
    	background-size: cover;
    }
    

    Now they work great— on my laptop— by they don't work on a phone where the images are zoomed way into their centers. Also, the parallax feature is completely missing on my new iPhone.

    Here is the site
    http://emily.viewfarm.com/

    Please watch this screen-grabbed video to see what I'm talking about.
    http://screencast.com/t/ZxpRpCH53Xe2

    Thanks,
    David

    http://emily.viewfarm.com/
    June 28, 2015 at 7:32 pm #157791
    davidd
    Member

    I did find this explanation for iOS issues that might explain the problem. I don't quite understand the solution.
    https://css-tricks.com/forums/topic/full-page-backgrounds-on-ios-background-size-cover/

    July 9, 2015 at 3:52 pm #158971
    Gandt
    Member

    Davidd, I found a solution. Yet to be tested on iphone but valid on browser window resize:

    The reason the parallax effect works - part of it anyway - is because it is using background-attachment:fixed;

    For some reason, one of your media queries has this:

    @media only screen and (max-width: 768px)
    .home-section-1, .home-section-3, .home-section-5 {
      background-attachment: scroll;

    When I change it to 'fixed' instead of 'scroll', it revives the functionality of the parallax effect.

    Give it a try, I'd test it on my iphone but I can't since I can only make temporary/local changes to your site with chrome's editor tool.

    Regards
    G

    July 9, 2015 at 4:11 pm #158974
    davidd
    Member

    Hi Gandt,

    Thanks for checking out my site. The issue isn't with the parallax effect, which apparently is a CPU hog on small devices, it's with background-size:contain, which apparently doesn't work so well in iOS. I fixed it by using background-size: 200% contain; It made the image the right size and the vertical dimension fit to contain the text. Don't ask me why that worked, but it did!

    David

    July 9, 2015 at 4:17 pm #158975
    Gandt
    Member

    That's odd, I just checked your site @ my iphone and I don't see the parallax effect kicking in when I go further down the page.

    July 9, 2015 at 4:38 pm #158977
    davidd
    Member

    That's right, Gandt. I used the hack above to align the images properly and the background-attachment: scroll to avoid the CPU overload.

    July 9, 2015 at 6:36 pm #158981
    Gandt
    Member

    Oh well, in that case then you don't need to use contain, you can just go for background-size:150% auto; for example.

    Contain is currently not well supported:

    http://caniuse.com/#feat=object-fit

    July 9, 2015 at 10:36 pm #158991
    davidd
    Member

    Neat resource. Thanks again for the attention!

  • Author
    Posts
Viewing 8 posts - 1 through 8 (of 8 total)
  • The forum ‘Design Tips and Tricks’ is closed to new topics and replies.

CTA

Ready to get started? Create a site or shop for themes.

Create a site with WP EngineShop for Themes

Footer

StudioPress

© 2023 WPEngine, Inc.

Products
  • Create a Site with WP Engine
  • Shop for Themes
  • Theme Features
  • Get Started
  • Showcase
Company
  • Brand Assets
  • Terms of Service
  • Accptable Usse Policy
  • Privacy Policy
  • Refund Policy
  • Contact Us
Community
  • Find Developers
  • Forums
  • Facebook Group
  • #GenesisWP
  • Showcase
Resources
  • StudioPress Blog
  • Help & Documentation
  • FAQs
  • Code Snippets
  • Affiliates
Connect
  • StudioPress Live
  • StudioPress FM
  • Facebook
  • Twitter
  • Dribbble