ioscssmobile-webkit

iOS styling an input type="file"


I'm trying to style the input with css to display the same way on iOS without the default iOS input styling that it applies.

<input name="t1" class="imgupload" type="file" accept="image/*" capture="camera">

input[type='file'] {
background: rgb(0, 0, 0);
border-radius: 5px;
color: rgb(255, 255, 255);
font-family: 'Lucida Grande';
padding: 0px 0px 0px 0px;
font-size: 16px;
margin-bottom: 20px;
width: 210px;
vertical-align: top;
margin-top: -2px;
}

Is there a specific -webkit class to disable the default styling.


Solution

  • You need to add -webkit-appearence: none;