0

I have a specific background that uses an image but chrome messes it up and I don't want to replace all the forms with the solution

input:-webkit-autofill {
    -webkit-box-shadow: 0 0 0px 1000px white inset;
}

So is there some way around it less generalized and more precise than that?

I'm using laravel so the html code is like this:

<li>{{ Form::email('email', '', array('placeholder' => 'E-mail', 'autocomplete'=>'off')) }}</li>
<li>{{ Form::password('password', array('placeholder' => 'Password', 'autocomplete'=>'off')) }}</li>

and the css for it is this:

#email-field{
    background:#fff url(../../img/site/username.png) no-repeat 12px center 
}
#pass-field{
    background:#fff url(../../img/site/icon_password.png) no-repeat 12px center
}
Micael Florêncio
  • 407
  • 1
  • 5
  • 11
  • Possible duplicate: http://stackoverflow.com/questions/2338102/override-browser-form-filling-and-input-highlighting-with-html-css – hungerstar Jan 16 '15 at 14:17

1 Answers1

2
#email-field:-webkit-autofill,
#pass-field:-webkit-autofill {
     -webkit-box-shadow: 0 0 0px 1000px white inset;
}
hungerstar
  • 21,206
  • 6
  • 50
  • 59