Topic Resolution: Resolved
Viewing 10 posts - 1 through 10 (of 10 total)
  • Author
    Posts
  • #31195
    Lee Burbank
    Guest

    I am having trouble with the back ground image appearing on Iphones. (not sure about androids) When I look at the mobile version in WordPress in the customize background section, it looks great, just how i want it to look. But in reality it is not even close. It is zoomed in on the picture so you cant even tell what it is. I tried all the CSS code that you gave before in a previous thread about this issue, but nothing works. Please Help.

    Lee

    #31200
    Jesse Owens
    Keymaster

    Hi Lee-

    The easiest and most sure-fire way to prevent this issue is to change the background “effect” from fixed to scroll or parallax. You can find that setting in the Customize > Background menu:
    Change the background effect to scroll

    The reason is that iOS Safari still doesn’t handle the “background: fixed” effect when the size is set to “cover page” correctly. That being said, I tried out the following Custom CSS rules on an iPhone 6s Plus and it seems to work well:

    @media (max-width: 991px) {
        body.custom-background {
            background-size: auto !important;
            max-height: 100vh;
            background-position: center top !important;
        }
    }
    

    resized image on iPhone

    #31239
    Lee Burbank
    Guest

    Hey Jessie,

    That works great, the code snippet that is. Now another question. Looking at the site on my iphone 7, the image is great, but the background of the site is white, after you scroll down beyond the image. As a result if you go to the blog, the menu for the blog is underneath the page on a white background which is impossible to see. How do I change the inherent background color of the whole site on mobile but not affect the appearance and function on a desktop? I want it to it to be gray like the background of page content.

    #31244
    Jesse Owens
    Keymaster

    Hi Lee-

    You can do this by adding one more line to that Custom CSS from above:

    @media (max-width: 991px) {
        body.custom-background {
            background-size: auto !important;
            max-height: 100vh;
            background-position: center top !important;
            background-color: rgb(32,32,32);
        }
    }
    

    That value of rgb(32,32,32) is based on what you’ve already got, although your site is actually using rgba(32,32,32,0.75). Using that will match the semi-transparent background you’re using now, but will be a little less readable.

    #31249
    Lee Burbank
    Guest

    can we make it even lighter so it looks closer to the transparent color? like a gray..so it is not such a jarring transition from the transparent to black. what color would that be?

    #31252
    Jesse Owens
    Keymaster

    Hi Lee-

    Yes, absolutely. RGB colors like this one go on a scale of rgb(0,0,0) for completely black up to rgb(255,255,255) for completely white.

    So you can simply increase the numbers in that rgb(32,32,32) to something like rgb(127,127,127) to make it an even gray, and adjust as needed until it looks the way you like it.

    #31259
    Lee burbank
    Guest

    I must be doing something wrong cause I got it at 200 and it still looks black.

    #31293
    Joseph W
    Keymaster

    Hi Lee,

    I sounds like there might be another CSS rule in the theme files that is overriding the custom background color in your CSS rule. There are a couple thing that you can try to make sure that your rule is respected as the page design is render and the first is to increase the specificity of the CSS selector. Try adding .palette-primary to the body.custom-background selector to see if that helps. The new code should look like this:

    @media (max-width: 991px) {
        body.custom-background.palette-primary {
            background-size: auto !important;
            max-height: 100vh;
            background-position: center top !important;
            background-color: rgb(200,200,200);
        }
    }

    You could also add the !important flag after the background-color assist to guarantee that it will always take priority over any other background-color rules.

    @media (max-width: 991px) {
        body.custom-background {
            background-size: auto !important;
            max-height: 100vh;
            background-position: center top !important;
            background-color: rgb(200,200,200) !important;
        }
    }

    Hopefully one of those methods helps you get the correct background color configured and please let us know if there is anything else that we can do to help!

    #31309
    lee burbank
    Guest

    Thanks Jessie,

    That seemed to do it. Some of the pages are still showing a light color but i think maybe that is what is still cached on my phone.

    I cleared the cache on my phone seems great now..

    #31315
    Jesse Owens
    Keymaster

    Glad to hear it Lee! And thanks to Joseph for jumping in with the code to save the day.

Viewing 10 posts - 1 through 10 (of 10 total)
  • The topic ‘[Resolved] iPhone Background Image on Evolv Theme’ is closed to new replies.