Holiday Notice: Support will be provided on a limited scale from December 24th, 2024, to January 2nd, 2025. Happy holidays and a wonderful New Year!


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

wuohyeah priority asked 6 months 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 6 months 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