Dienstag, 30. August 2011

Styling Browser Validation Messages

With HTML5 there came the great power of using the browsers built-in validation methods for <input> fields. Some days ago I heared a co-worker arguing that it's not possible to style the error messages generated by the browser. It's just wrong. You can style them, they are using pseudo classes and, of course, every browser uses different pseudo classes:

Firefox: https://developer.mozilla.org/en/CSS/%3ainvalid
Chrome [Webkit]: http://trac.webkit.org/browser/trunk/Source/WebCore/css/html.css (search for 'bubble' there)

Sadly, if you want to use it today, you have to implement a fallback for IE.



Keine Kommentare:

Kommentar veröffentlichen