Instead of image how to include a text saying required
<label class="req">Name:</label>
.req
{
//background-image:url(img/mandatory.jpg);
background-position:top right;
background-repeat:no-repeat;
padding-right:10px;
font-weight:bold;
}
If you don’t want the background image at all, remove it, and use the
:afterpseudo-element to insert the text:If you need the background image as a fallback for older browsers (because IE7 and older don’t recognize
:after), you’ll have to resort to some CSS hack or something to apply it for older browsers (or just put the background image in a separate stylesheet with a conditional comment).