Turn Off Iphone/Safari Input Element Rounding

Turn off iPhone/Safari input element rounding

On iOS 5 and later:

input {
border-radius: 0;
}

input[type="search"] {
-webkit-appearance: none;
}

If you must only remove the rounded corners on iOS or otherwise for some reason cannot normalize rounded corners across platforms, use input { -webkit-border-radius: 0; } property instead, which is still supported. Of course do note that Apple can choose to drop support for the prefixed property at any time, but considering their other platform-specific CSS features chances are they'll keep it around.

On legacy versions you had to set -webkit-appearance: none instead:

input {
-webkit-appearance: none;
}

iOS forces rounded corners and glare on inputs

The version I had working is:

input {
-webkit-appearance: none;
}

In some webkit browser versions, you may also be faced with the border-radius still being in place. Reset with the following:

input {
-webkit-border-radius:0;
border-radius:0;
}

This can be extended to apply to all webkit styled form components such as input, select, button or textarea.

In reference to the original question, you wouldn't use the value 'none' when clearing any unit based css element.
Also be aware that this hides checkboxes in Chrome, so perhaps use something like input[type=text] or input[type=submit], input[type=text] or instead filter out those that don't use rounded corner settings such as input:not([type=checkbox]), input:not([type=radio]).

Remove iOS input shadow

You'll need to use -webkit-appearance: none; to override the default IOS styles. However, selecting just the input tag in CSS will not override the default IOS styles, because IOS adds it's styles by using an attribute selector input[type=text]. Therefore your CSS will need to use an attribute selector to override the default IOS CSS styles that have been pre-set.

Try this:

input[type=text] {   
/* Remove First */
-webkit-appearance: none;
-moz-appearance: none;
appearance: none;

/* Then Style */
border-radius: 15px;
border: 1px dashed #BBB;
padding: 10px;
line-height: 20px;
text-align: center;
background: transparent;
outline: none;
}

Helpful Links:

You can learn more about appearance here:

http://css-tricks.com/almanac/properties/a/appearance/

If you'd like to learn more about CSS attribute selectors, you can find a very informative article here:

http://css-tricks.com/attribute-selectors/

iPad default input border radius

Are you sure it's exclusive to the new iPad? Or might it be something pertaining to all iOS devices? I ask because the Safari browser in iOS devices does apply a specific styling to input elements.

You can, however, turn it off with this:

input {
-webkit-appearance: none;
}

Do that and border-radius: 0 starts working just as you'd expect it to.

This has been answered here a few times before: Turn off iPhone/Safari input element rounding.

iOS Select Rounded Corners Background Color

This works for me.

Select option with an arrow img:

.select-css { display: block; font-size: 16px; font-family: sans-serif; font-weight: 700; color: #444; line-height: 1.3; padding: .6em 1.4em .5em .8em; width: 100%; max-width: 100%; box-sizing: border-box; margin: 0; border: 1px solid #aaa; box-shadow: 0 1px 0 1px rgba(0,0,0,.04); border-radius: .5em; -moz-appearance: none; -webkit-appearance: none; appearance: none; background-color: #fff; background-image: url('data:image/svg+xml;charset=US-ASCII,%3Csvg%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20width%3D%22292.4%22%20height%3D%22292.4%22%3E%3Cpath%20fill%3D%22%23007CB2%22%20d%3D%22M287%2069.4a17.6%2017.6%200%200%200-13-5.4H18.4c-5%200-9.3%201.8-12.9%205.4A17.6%2017.6%200%200%200%200%2082.2c0%205%201.8%209.3%205.4%2012.9l128%20127.9c3.6%203.6%207.8%205.4%2012.8%205.4s9.2-1.8%2012.8-5.4L287%2095c3.5-3.5%205.4-7.8%205.4-12.8%200-5-1.9-9.2-5.5-12.8z%22%2F%3E%3C%2Fsvg%3E'),   linear-gradient(to bottom, #ffffff 0%,#e5e5e5 100%); background-repeat: no-repeat, repeat; background-position: right .7em top 50%, 0 0; background-size: .65em auto, 100%;}
<select class="select-css"> <option>This is a native select element</option> <option>Apples</option> <option>Bananas</option> <option>Grapes</option> <option>Oranges</option></select>


Related Topics



Leave a reply



Submit