Abhijit Borkakoty Abhijit Borkakoty - 1 year ago 81
CSS Question

Css class getting added through php but without styles

I am trying to validate forms through php and whenever an error occurs I want the input field to be bordered by red color. The class is getting added but styles arent showing. The style is getting cancelled. Any advice to tackle this??

Below is a screrenshot

enter image description here

Answer Source

Try this:

    color:red !important;   // Now this will override the default css and apply yours
Recommended from our users: Dynamic Network Monitoring from WhatsUp Gold from IPSwitch. Free Download