Wiki

CSS in Wiki Pages

 
Picture of Daniel Duenner
CSS in Wiki Pages
 
Hi

I'm using moodle 3.1 and was wondering if I can add an inline stylesheet to a wiki page in moodle?
For example I want to add this code on a wiki page:

<style>
body {background-color: powderblue;}
h1   {color: blue;}
p    {color: red;}
</style>

Moodle cuts it out when I save. Is there a way to make it stay in my entry?

Thanks for your help.


 
Average of ratings: -
Picture of Jon Bolton
Re: CSS in Wiki Pages
Group Particularly helpful MoodlersGroup Testers

You can add this to your custom css if you have access, eg

body#page-mod-wiki-view {background: PowderBlue;}
#page-mod-wiki-view h1 {color: blue;}


You can even target individual wikis, eg.

body.cmid-78 {background: PowderBlue;}
.cmid-78 h1 {color: blue;}
.cmid-78 p {color: red;}


or, you could add it inline in the wiki page if you really have to:

<h1 style="color: blue;">headingtext </h1>
 
Average of ratings: -