Skip to content

Annoying yellow input fields from autofill

If you have the Google tool bar installed on any of your browsers, I’m sure you’ve come across yellow input fields in forms. This is a feature called autofill that highlights the fields that the tool bar can automatically fill for you. If you’re a web designer, these can be particularly annoying:

  • They may not fit in with your site’s colour scheme
  • User’s may get confused into thinking these are the only required fields
  • If you’re trying to spice up the look of your form, it makes things ugly

Input problem

Until recently I have always accepted that that was the way it was going to be. I have Google tool bar installed on Firefox. Installed it ages ago and use it occasionally to look up page ranks however, in my opinion it’s pretty useless. With the latest versions of Firefox and Explorer I don’t think you need it, just gets in the way, so I keep it hidden.

I was trying to spruce up a form by adding a background image to input boxes and the fields were turning yellow, as usual, but this time I decided to look up a solution to my problem. Incidentally, you can turn the autofill feature off, but users visiting the site most likely have it turned on. I came across a few Javascript solutions, which I thought would do the trick, until I eventually discovered that there was a simple solution to the problem the whole time. Simply by adding !important after my CSS line, the browser will obey my style rather than the autofill style.
background:#585858 !important;

Input solved

A simple solution to an annoying problem. My advice is to remove Google tool bar in the first place, but as a web designer it’s handy to know what some of your users might be seeing.

Want to read more?

    None related articles found

Psst! We're hiring an Interaction Designer at Kareo. Click here if interested.

Photo of Lee Munroe

Written by Lee Munroe.

Follow @leemunroe on Twitter for more articles on UX design.


5 Appreciated Comments

Add your comment

  1. John Burley says:

    Superb fix. I’d been wondering about this, and was about to use some obscure JavaScript fix myself before I found your article.

    Thanks,

    John

  2. cdk says:

    Where exactly did you all post “background:#585858 !important;”

  3. lee says:

    @cdk
    It goes in your css style sheet as the background for your input. So if your form has an id of ‘myform’ then:

    #myform input{
    background:#585858 !important;
    }

    Hope this helps

  4. Judi says:

    Wow, thanks for the fix. I could have never thought of that. This is much more simpler than that crazy JavaScript.

  5. Freelancelot says:

    Awesome. This will fix the newly-implemented, dreaded yellow fields present in Safari v5.1 when autofill is active, which is turned on by default. Looks awful on sites where the yellow clashes with the design, so this is a welcome fix.

    Many thanks!!