CSS on moodle

Re: CSS on moodle

by C Behan -
Number of replies: 0

Well you will of course need to ask the site admin to enter it in to the theme's settings custom css field, but you can specify css for a particular course alright. 

Say your course id is 123 and you want to style all tables in that course only to have a red background, the css would be like 

.course-123 table {background-color:red;}


If that's not possible there is another solution. But tread very carefully because you could make a mess of your whole course if you make a small mistake. This should be a last resort.

  • Change your preferred text editor to plain text
  • Add a block on your course page, and set it to show on all pages within your course
  • Add an open and close tags: <style> </style>. This is where you have to be very careful because if you forget to close that style tag, delete it accidentally etc., you could create a situation where you can't do anything on your course page and the only way to resolve it would be to backup your course without blocks and create a new course page.
  • Within the style tags enter your style i.e. table {background-color:red;}