how to modify the css of a plugin view

Re: how to modify the css of a plugin view

par Davo Smith,
Nombre de réponses : 0
Avatar Core developers Avatar Particularly helpful Moodlers Avatar Peer reviewers Avatar Plugin developers

If you put it in styles.css then it is included in every page.

If you want to target just the single page, then take a look at the classes applied to the body tag on each page and that will allow you to target the CSS selectors quite specifically.

e.g. this page (on Moodle.org) has the body classes:

  • path-mod
  • path-mod-forum

If you want to be even more specific, it has the body id of:

  • page-mod-forum-post

And if you are wanting to be ridiculously specific, you can even target the course, category, context and course module ids, via the classes.