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?

by Jeff Schou -
Number of replies: 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

Average of ratings: -
In reply to Jeff Schou

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

by Howard Miller -
Picture of Core developers Picture of Documentation writers Picture of Particularly helpful Moodlers Picture of Peer reviewers Picture of Plugin developers

Moving to Themes forum...

(Which theme are you using?)

In reply to Howard Miller

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

by 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!

In reply to Jeff Schou

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

by 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

In reply to Jeff Schou

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

by 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

 

In reply to Mary Evans

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

by 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.

In reply to Jeff Schou

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

by 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 {  }