how to show asterisk sign before label start when label has fixed width

css, html

Solution

Use :before pseudo class

     .label:before{
     content:"*" ;
     color:red   
     }

Or

    #req:before{
    content:"*" ;
    color:red    
    }
​

DEMO Updated

Problem

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

Original source