Example: Highlighting mandatory fields

Previous Next

Here is an example of a style sheet rule that applies to all HTML elements that belong to the mandatory class.

td.mandatory, input.mandatory{
   color:red;
}

 

The result is that the text in all mandatory fields and their labels become red. The Mandatory class is an example of a domain class.