• Resolved Anonymous User

    (@anonymized-11539796)


    After last theme update on my background image scrolls w/ text etc. My site is rxfitness.net

    Any ideas on how to fix this? Thank you.
    @media screen and ( min-width: 1072px )
    {
    /* add image background to page */
    #page {
    background-image: url(“/wp-content/uploads/2016/12/background.png”);
    background-repeat: no-repeat;
    background-attachment: fixed;
    background-size: cover;
    background-position: center top;
    }

Viewing 15 replies - 1 through 15 (of 17 total)
  • Andrew Nevins

    (@anevins)

    WCLDN 2018 Contributor | Volunteer support

    Which browser and browser version are you using? The background is fixed for me on newest Chrome.

    Try clearing your browser’s cache as a precauation.

    Thread Starter Anonymous User

    (@anonymized-11539796)

    Hi Andrew,

    Thanks for the reply. I tried clearing the cache and even tried on guest mode and incognito mode on both my Chromebook & Chromebox w/ all relevant updates but w/ no resolve. The background moves right along w/ the font…weird.

    • This reply was modified 7 years, 8 months ago by Anonymous User.
    Andrew Nevins

    (@anevins)

    WCLDN 2018 Contributor | Volunteer support

    I’m a bit confused. The term ‘fixed’ in CSS means that it moves with the scroll, so that would be correct behaviour. Do you mean you don’t want the background to move with the scroll?

    Thread Starter Anonymous User

    (@anonymized-11539796)

    I was under the assumption that Fixed does not move with the element and local would move w/ the element. But then I read this and completely confuses me (in terms of scroll) https://developer.mozilla.org/en-US/docs/Web/CSS/background-attachment

    So my apologies on that if I am taking things to literal (part of my DNA).

    I always used the previous code and it worked fine up until the most recent theme update.

    Thread Starter Anonymous User

    (@anonymized-11539796)

    So I am looking to have the image stay put while the rest of the page scrolls. thank You.

    • This reply was modified 7 years, 8 months ago by Anonymous User.
    Thread Starter Anonymous User

    (@anonymized-11539796)

    and again states here too (I’m confused) https://www.w3schools.com/css/css_background.asp

    Thread Starter Anonymous User

    (@anonymized-11539796)

    So anymore thoughts or ideas? Thank you.

    Andrew Nevins

    (@anevins)

    WCLDN 2018 Contributor | Volunteer support

    Try adding this to the “Additional CSS” part of the dashboard:

    
    @media screen and (min-width: 1072px) {
    
        html #page {
            background-attachment: scroll !important;
            background-size: 100%;
        }
        
    }
    

    https://codex.www.ads-software.com/CSS#Custom_CSS_in_WordPress

    Thread Starter Anonymous User

    (@anonymized-11539796)

    Still bit of confusion here. I want the image to stay put.
    Background images will scroll with the page unless the “fixed” keyword is used. The “fixed” keyword tells the browser to keep the image where you place it. The other HTML elements will scroll, but the background image will stay put.

    and nothing seems to work anymore for some reason.
    like I stated this worked up until last update;
    @media screen and ( min-width: 1072px )
    {
    /* add image background to page */
    #page {
    background-image: url(“/wp-content/uploads/2016/12/background.png”);
    background-repeat: no-repeat;
    background-attachment: fixed;
    background-size: cover;
    background-position: center top;
    }

    Thread Starter Anonymous User

    (@anonymized-11539796)

    But I greatly appreciate your help immensely.

    Andrew Nevins

    (@anevins)

    WCLDN 2018 Contributor | Volunteer support

    I think I do understand, but I don’t see the code I recommended on your site. Could you double-check you’ve added it to the “Additional CSS” part of the dashboard, and that the code is exact as above?

    Thread Starter Anonymous User

    (@anonymized-11539796)

    I did and it did not work. I re-added it so you can see. Thank you.

    Andrew Nevins

    (@anevins)

    WCLDN 2018 Contributor | Volunteer support

    Could you clear your browser’s cache to triple-check? When I check your website now, the background stays at the top and does not follow the scrolling.

    Thread Starter Anonymous User

    (@anonymized-11539796)

    But again that is not what I want..lol..

    I want the background fixed as in not move at all and the text/logo etc to scroll over it.

    That is the definition of a fixed background like I stated previously and tried to address that confusion.
    It was that way for months and then the code stopped working when there was an update last week. thank you Andrew

    • This reply was modified 7 years, 8 months ago by Anonymous User.
    Andrew Nevins

    (@anevins)

    WCLDN 2018 Contributor | Volunteer support

    Oh, for me that was happening before. Which browser and browser version was that not happening?

Viewing 15 replies - 1 through 15 (of 17 total)
  • The topic ‘Back image not fixed’ is closed to new replies.