CSS Example: Highlighting mandatory fields

  • 5 January 2021
  • 0 replies
  • 8 views

Badge +1

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.


0 replies

Be the first to reply!

Reply