Warning message in css

1

I'm using html error messages

<form>
  <input required />
  <input type="submit" />
</form>

My question is: can the sign be modified? make it bigger, change the color and other ... I show it in an image

    
asked by hubman 27.11.2016 в 01:45
source

2 answers

2

Before there was a way to do it in chrome with the pseudo-elements, but they stopped working in 2013.

::-webkit-validation-bubble
::-webkit-validation-bubble-arrow-clipper
::-webkit-validation-bubble-arrow
::-webkit-validation-bubble-message

link

The only way to implement your custom style is to make a validation system from scratch.

    
answered by 27.11.2016 / 02:14
source
3

It is not possible to change message styles for validation errors since these are browser-specific. Before it could be done in chrome form_validation_messages using pseudo-elementos

::-webkit-validation-bubble
::-webkit-validation-bubble-arrow
::-webkit-validation-bubble-arrow-clipper
::-webkit-validation-bubble-heading
::-webkit-validation-bubble-message
::-webkit-validation-bubble-text-block

But as of versión 28 Chrome removed Support for these pseudo-elementos .

What you can do is change the message that appears:

<input required  oninvalid="this.setCustomValidity('nuevo mensaje a mostrar')"/>
    
answered by 27.11.2016 в 02:10