How to add my own css

How to add my own css

by oriol sanchez -
Number of replies: 3

Hello,

how can i add my own name.css i'm searching the headers to add my own archive ?

or other solution it can be where moodle storage her own css, i find  /theme/style but i add a line there and i can't see nothing !!

 

ths !!

Average of ratings: -
In reply to oriol sanchez

Re: How to add my own css

by Davo Smith -
Picture of Core developers Picture of Particularly helpful Moodlers Picture of Peer reviewers Picture of Plugin developers

I'm not quite sure what you mean by 'add to my own archive' - are you refering to the code for your site?

Are you trying to add the styles to a plugin, in which case name it 'styles.css' and put it in your plugin base folder (e.g. mod/mypluginname) then visit 'Site admin > Developer > Purge all caches'.

If you're trying to add it to a whole site, then the theme is a good place to put it - put the stylesheet in theme/THEMENAME/style/, edit theme/THEMENAME/config.php and add it to the $THEME->sheets list.

You should then update the version number for your theme in theme.php or visit 'Site admin > Developer > Purge all caches'.

Alternatively, you can visit 'Site admin > Appearance > Themes > THEMENAME' and fill in the 'custom css' box to just override the CSS on a single install.

In reply to oriol sanchez

Re: How to add my own css

by Mary Evans -
Picture of Core developers Picture of Documentation writers Picture of Peer reviewers Picture of Plugin developers Picture of Testers

Some themes allow you to add CSS. If you use the Formal White theme, that allows you to make changes to the theme and to the CSS too.

All the theme setting pages related to all the themes, are listed at this point in the Site Administration side block.

Site Administration > Appearance > Themes --> at this point you will see list of theme names which have custom setting pages. Click the Formal white link and it will display a form where you can add various settings like font size, colors, and also add some CSS in a special text area provided.

Happy moodling!

Mary