Fixing background picture

Fixing background picture

by Jorge Tavares -
Number of replies: 6

Hi, I'm trying to fix the background picture in 'Classic' Theme, following some tips from this forum, with no luck. I'm running Moodle 3.7.2.

I've tried some CSS code:  background-repeat: no-repeat and background-attachment: fixed in file body-background.scss, located in theme/classic/scss/classic, but didn't work.

Can someone help me with this issue.

Thank you for any help.

Jorge

Average of ratings: -
In reply to Jorge Tavares

Re: Fixing background picture

by Gareth J Barnard -
Picture of Core developers Picture of Particularly helpful Moodlers Picture of Plugin developers
What's broken?
In reply to Gareth J Barnard

Re: Fixing background picture

by Jorge Tavares -
I put a picture in background, but it scrolls with page content. I would like to know how to freeze the background picture, so only the content will scroll over the background.
In reply to Jorge Tavares

Re: Fixing background picture

by Gareth J Barnard -
Picture of Core developers Picture of Particularly helpful Moodlers Picture of Plugin developers
Custom CSS:
body {
    background-attachment: fixed;
}
Average of ratings: Useful (1)
In reply to Gareth J Barnard

Re: Fixing background picture

by Jorge Tavares -
Thanks for your help. Can you tell me where should I put this code? I' ve tried in file public_html/theme/classic/style/moodle.css, but didn't work. Do I have to reload the theme to changes take effect, or its the wrong file?
In reply to Jorge Tavares

Re: Fixing background picture

by Gareth J Barnard -
Picture of Core developers Picture of Particularly helpful Moodlers Picture of Plugin developers

"theme_classic | scss" setting on the UI, its the "Raw SCSS" setting for the theme on the "Advanced" tab.

Average of ratings: Useful (1)
In reply to Gareth J Barnard

Re: Fixing background picture

by Jorge Tavares -
Got it!!! It's working perfectly. Thank you very much Gareth!!

-Jorge
Average of ratings: Useful (1)