I want to show asterisk sign before my label indicating it is a mandatory field. following is my css id code for label,
#label{
float: left;
height: 30px;
padding-right: 4px;
padding-top: 2px;
position: relative;
text-align: right;
vertical-align: middle;
width: 73px;
}
output of above is, * Label but I want it to be like, *Label Thanks
Use :before pseudo class
.label:before{
content:"*" ;
color:red
}
Or
#req:before{
content:"*" ;
color:red
}
DEMO Updated
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With