Topic: How to make input label with a red star ?

wuohyeah priority asked 1 month ago


enter image description here

How to make input label with a red * to indicate a required field? Please you show me a snippet. Thank you.


Bartosz Cylwik staff answered 1 month ago


You can play around with the label pseudoclass. Add padding-right to the form-label class and create a form-label::after with * as a content

.form-label::after {
    ...
    content: "*";
    color: red;
    ...
}


Please insert min. 20 characters.

FREE CONSULTATION

Hire our experts to build a dedicated project. We'll analyze your business requirements, for free.

Status

Answered

Specification of the issue

  • ForumUser: Priority
  • Premium support: Yes
  • Technology: MDB Vue
  • MDB Version: MDB5 5.0.0
  • Device: Desktop
  • Browser: Chrome
  • OS: Linux
  • Provided sample code: No
  • Provided link: No