css coding style

Re: css coding style

by Justin Hunt -
Number of replies: 0
Picture of Particularly helpful Moodlers Picture of Plugin developers

You put a styles.css file in the root of your plugin directory.

Moodle will load it for you. 

You will probably need to add css class names and ids to your html elements. If you are using moodle output library you can add them like this:

 html_writer::tag('th', $title, array('class' => 'mytablecellclass')) 

With moodle forms it looks like this:

$mform->addElement('text', 'textboxname',  get_string('textboxname', 'mod_mymod'), array('class' => 'mytextboxclass'));