Topic: How to make input label with a red star ?
wuohyeah priority asked 6 months ago
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;
...
}
FREE CONSULTATION
Hire our experts to build a dedicated project. We'll analyze your business requirements, for free.
Answered
- 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