Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

remove inner shadow of text input

Tags:

html

css

input

So I have a text input, im using html5, on chrome, and I want to change the look of a text input, I've removed the outline on focus (orange on chrome), I set the background to a light color #f1f1f1 but now there is like a thicker border on the top and left sides, like it's meant to look pushed in, when there is no change in background color this doesn't happen. How do I remove it? Sorry I can't provide a picture, on a mobile device.

It happens on chrome, ie, and Firefox, can't test any others.

like image 589
FabianCook Avatar asked Oct 09 '12 01:10

FabianCook


People also ask

How do you get rid of the input black outline?

1 Answer. Show activity on this post. Add outline: none; to your css for the input element.


2 Answers

border-style:solid; will override the inset style. Which is what you asked.

border:none will remove the border all together.

border-width:1px will set it up to be kind of like before the background change.

border:1px solid #cccccc is more specific and applies all three, width, style and color.

Example: https://jsbin.com/quleh/2/edit?html,output

like image 124
Anthony Hatzopoulos Avatar answered Sep 23 '22 21:09

Anthony Hatzopoulos


This is the solution for mobile safari:

  appearance: none;   -moz-appearance: none;   -webkit-appearance: none; 

as per https://developer.mozilla.org/en-US/docs/Web/CSS/appearance

and as suggested here: Remove textarea inner shadow on Mobile Safari (iPhone)

like image 21
Owen Avatar answered Sep 21 '22 21:09

Owen