[Resolved] Background image questions

Home Forums Support [Resolved] Background image questions

Home Forums Support Background image questions

Viewing 9 posts - 1 through 9 (of 9 total)
  • Author
    Posts
  • #346476
    Warwick

    Please forgive the probably very simple questions – but I am a complete novice with using wp and generate press.

    I am busy building a site and have two questions relating to background images:

    1. I added a background image to the home page and see it carries across to every page – is there a way to change page by page? In some instances I would probably not want a background image at all?

    2. I have set the image to fixed so that I get a scrolling effect. This works fine on the laptop. When I go to the customize tab on wp and click on the mobile icon it does the same. However, when trying to actually view the site on a mobile the image does not scroll at all. Can you advise what this may be?

    The site is: http://www.safariinstyle.com

    Thanks for any help.

    #346614
    Leo
    Staff
    Customer Support

    Hi there,

    1. You can use Tom’s Simple CSS plugin: https://docs.generatepress.com/article/adding-css/#simple-css
    It gives you a CSS metabox in the Edit Page screen of each page. Then you would add this CSS:

    .separate-containers .inside-article {
        background-image: background-image: url('URL TO THE IMAGE');
    }

    2. Not quite sure about this one. I’ll ask Tom to have a look πŸ™‚

    #346737
    Tom
    Lead Developer
    Lead Developer

    Mobile devices typically don’t do the fixed background image effect, as it can look pretty bad/laggy on mobile devices.

    #346789
    Warwick

    Thanks for the responses.

    Tom – in that case is it possible to set the background image differently for mobile? As it is currently I really like the effect for the laptop/desktop, but the image is stuck in the wrong position to be any use on mobile without scrolling?

    Or possibly I should just stick with a plain background and take baby steps πŸ™‚

    #347140
    Tom
    Lead Developer
    Lead Developer

    You can definitely apply a different background on mobile:

    @media (max-width: 768px) {
        .separate-containers .inside-article {
            background-image: url('URL TO THE IMAGE');
        }
    }

    Let me know if you need more info πŸ™‚

    #348809
    Warwick

    Thanks Tom – I may give it a try – however, honestly that starts scaring me πŸ™‚ – I am rather technically inept sadly.

    #348903
    Tom
    Lead Developer
    Lead Developer

    It’s not as scary as it looks πŸ™‚

    Just copy and paste, and the put the URL to your image in there.

    #356425
    David
    Staff
    Customer Support

    Hi Tom,

    question – i understand the issues with fixed bg images on mobile, so how did you manage to make this work when using the page headers? Is it that the Parallax uses JS?

    If that is the case is it possible to use the parallax code on a section?

    thanks

    David

    #356519
    Tom
    Lead Developer
    Lead Developer

    That’s correct. Sections also have an option to enable parallax πŸ™‚

Viewing 9 posts - 1 through 9 (of 9 total)
  • You must be logged in to reply to this topic.