How do I stop Chrome from yellowing my site's input boxes?

Posted by davebug on Stack Overflow See other posts from Stack Overflow or by davebug
Published on 2008-10-06T20:02:55Z Indexed on 2010/05/03 7:08 UTC
Read the original article Hit count: 192

Among other text and visual aids on a form submission, post-validation, I'm coloring my input boxes red to signify the interactive area needing attention.

On Chrome (and for Google Toolbar users) the auto-fill feature re-colors my input forms yellow. Here's the complex issue: I want auto-complete allowed on my forms, as it speeds users logging in. I am going to check into the ability to turn the autocomplete attribute to off if/when there's an error triggered, but it is a complex bit of coding to programmatically turn off the auto-complete for the single effected input on a page. This, to put it simply, would be a major headache.

So to try to avoid that issue, is there any simpler method of stopping Chrome from re-coloring the input boxes?

[edit] I tried the !important suggestion below and it had no effect. I have not yet checked Google Toolbar to see if the !important attribute woudl work for that.

As far as I can tell, there isn't any means other than using the autocomplete attribute (which does appear to work).

© Stack Overflow or respective owner

Related posts about google-chrome

Related posts about form-validation