Am new in CSS

I have form like below code.

    <span class="lable"> Practice Name<span class="PreRequired">*</span></span> 
        <input type="text" name="practiceName" ng-model="practiceData.practiceName" style="width:20.5%;" required  ng-pattern="/^([a-zA-Z]+\s*)*[a-zA-Z]+$/" placeholder="Practice Name"/>
    <span ng-show="SubmitPractice.practiceName.$error.pattern">
         Please enter valid Practice Name
    <span class="lable"> Practice Head<span class="PreRequired">*</span></span> 
    <select ng-model="practiceData.practiceHead" style="width:20.5%;" required="required" ng-options="em.gslab_id as em.employee_name for em in userrole" >
        <option style="display:none" value="">Select Practice Head</option>
    <span style='color:red' ng-show="practiceData.practiceHead===''  && (practiceData.practiceExecs+'').length>0">
     Please select Practice Head 

In above, I have class="lable". I have applied CSS to that class like aligning and other needed things.I have used this class in lable.
I have another class="required".which I have used for input,select which marks red outline for input area.

I want to add * character after my lable (in above casees lables like Practice Name,Practice Head) , which I am doing by addng it explicitly using <span class="PreRequired">*</span>

Is it possible using CSS, that * get added to lable span as I use required class to any div?

2 Years
Discussion Span
Last Post by hericles

You can use this:

.label:after {
   content: '*';

You can add colors and stuff into that class as well.

This topic has been dead for over six months. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.