Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

CSS Box Shadow not working on iPhone

Tags:

html

css

For some reason I can't get the CSS box-shadow to show up on Safari or Chrome on my iPhone. Here is the code:

input.error {
  box-shadow: 0 0 5px 1px rgba(224, 39, 14, 1);
  -webkit-box-shadow: 0 0 5px 1px rgba(224, 39, 14, 1); 
  -moz-box-shadow: 0 0 5px 1px rgba(224, 39, 14, 1);
}

The code is being used on HTML Input fields, would this cause any problems? What am I doing wrong?

Shows up in browser fine...

like image 703
Romes Avatar asked Mar 15 '13 19:03

Romes


2 Answers

If this in a form block, add

-webkit-appearance: none;

iPhones can mess up forms. See here.

like image 96
Bjoern Avatar answered Sep 23 '22 21:09

Bjoern


Try adding -webkit-appearance: none; iOS tends to mess up forms.

like image 45
Chris Hawkes Avatar answered Sep 23 '22 21:09

Chris Hawkes