HTML5 input type types if validation fails

Yo all

My question is pretty simple: I need to erase the red border (or shadow?) Of inputs that cannot be verified (e.g. email). Is there any new CSS trick?

If you still do not understand what I am telling you, then this is the color to be changed: enter image description here

+4
source share
1 answer

For more on Firefox details, see https://developer.mozilla.org/en/CSS/%3Ainvalid , although apparently the parts without the "-moz" also apply to other browsers:

The class pseudo-class :invalid is applied automatically to <input> elements whose contents cannot be checked according to the type of input setting. This makes it easy to use invalid fields. An appearance that helps the user identify and correct errors.

By default, Gecko does not apply style to the :invalid pseudo-class. However, it applies the style (red “glow” using the box-shadow property) to the :-moz-ui-invalid pseudo :-moz-ui-invalid , which is used in a subset of cases for :invalid .

+5
source

All Articles