Moodle 3.4 - How do I change the background color to a topic?

Moodle 3.4 - How do I change the background color to a topic?

- Jeff Schou の投稿
返信数: 6

I have several topic sections for a project I'm working on and want to change the background color.  I have the HTML tags for font size- do I need a body tag in that string or can it be separate?  I've tried several sequences.  The same issue would apply for font color as well.  I've looked for a button but there isn't one that I can see.


Thank you

Jeff Schou への返信

Re: Moodle 3.4 - How do I change the background color to a topic?

- Howard Miller の投稿
画像 Core developers 画像 Documentation writers 画像 Particularly helpful Moodlers 画像 Peer reviewers 画像 Plugin developers

Moving to Themes forum...

(Which theme are you using?)

Howard Miller への返信

Re: Moodle 3.4 - How do I change the background color to a topic?

- Jeff Schou の投稿

I don't think I have one.  I'm trying some plugins but first need to let my administer grant permission for me to download anything.  I appreciate you trying to help though!

Jeff Schou への返信

Re: Moodle 3.4 - How do I change the background color to a topic?

- Mary Evans の投稿

Hi, 

If you are not the Admin for your Moodle site then you cannot add the necessary styles that will add the background colour.

If I knew the URL of your colleges Moodle site, then I could tell you which theme it is.

Adding tge CSS is easy enough it is just a matter of adding the code I added above., to the Custom CSS area in the theme.

Cheers

Mary

Jeff Schou への返信

Re: Moodle 3.4 - How do I change the background color to a topic?

- Mary Evans の投稿

You could try the following CSS selector classes found in the following link...

https://github.com/moodle/moodle/blob/MOODLE_34_STABLE/course/format/topics/styles.css?L6

which targets the content of the topics page.

FOR EXAMPLE: 

course-content ul.topics li.section .content {
    background-color: #abc;    
}

All the CSS on that page is used to style the topics page, so perhaps try a selection as you can style left or right sides as well as the content and text colours.

Depending on the Theme you use you should be able to add CSS to the Custom CSS section of its setting.

Hope this helps?

Mary

 

Mary Evans への返信

Re: Moodle 3.4 - How do I change the background color to a topic?

- Jeff Schou の投稿

Thank you Mary.  I'm in over my head here as I'm not familiar with CSS, so I'll look the basics of that.  I appreciate your answer.

Jeff Schou への返信

Re: Moodle 3.4 - How do I change the background color to a topic?

- Mary Evans の投稿

Hi, 

Further to my last comment, I forgot to add a dot to the beginning of the CSS example...

it should look like this...

.course-content ul.topics li.section .content {  }