Search code examples
cssvalidationrequired

css for required character * to red color in all pages


I have * in all pages with forms. Can I change * to red color for all required fields through out my site with out wrapping it in div or some other wrapper?


Solution

  • hope it will help you, try with jquery, it will all " * " and chages the color to red

       $("body").html($("body").html().replace(/[*]/g,'<span style="color:red">*</span>'));
    

    demo