Adding css

Adding css

by Reza Dan -
Number of replies: 3

Hello,

I need to add a css section before a table. After including the <head><style> ...</style></head> before the table and updating the page, <head><style> ...</style></head> disappears! Does anybody know where I should include the css style? 

Thanks,

Reza

Average of ratings: -
In reply to Reza Dan

Re: Adding css

by Jon Bolton -
Picture of Particularly helpful Moodlers Picture of Testers

Head has already been opened by Moodle so you can't ask for it again.

You have several options:

1. Add it to the style sheet of your theme (better still, create a new one and call it from your theme's config.php)

2. Check whether your theme has a option to add custom css.

3. Go to Site Admin > Appearance > Additional HTML and add it to the "Within Head" box in the format...

<style>
    background: #ffeebb ;
</style>

4. Add it inline to the table in the format...

<table style="background: #ffeebb ;">
Average of ratings: Useful (2)
In reply to Jon Bolton

Re: Adding css

by Reza Dan -

Hi Jon,

Tried option 3. Works like a charm.  Thanks ever so much.

Reza

In reply to Reza Dan

Re: Adding css

by Johan Belhaj -

Dear 

Please I have a problem with adding Css to my Page in moodle 

is when i add Css code in the page it disappears 

could you please let me know how can i fix it 


thank you a lot