8

Is it possible to style the default tooltip? Here's a JSFiddle demonstrating the default tooltip.

<form>
    <input type="text" placeholder="Submit without entering value" required>
    <input type="submit">
</form>
CloudBranch
  • 1,153
  • 3
  • 15
  • 19

3 Answers3

13

You can not change "default tooltip" (HTML5 validation bubble) - it is determinated by browser vendor and several other params like browser language.

You can, however, prevent validation bubble - by doing something like

<input placeholder="Lorem ipsum..." required oninvalid="myCustomFunction()" />

From now on, with myCustomFunction you can develop your own bubble.

Reference.

Miloš Đakonović
  • 3,541
  • 5
  • 32
  • 49
1

this article nicely sums up the possibilities

>> http://developer.telerik.com/featured/building-html5-form-validation-bubble-replacements/

Honza
  • 624
  • 6
  • 20
0

Use this css to style placeholder text

::-webkit-input-placeholder { /* Chrome */
  color: red;
}
Dilip Nayak
  • 293
  • 2
  • 12