Stop Safari Mobile from giving input buttons rounded corners

IosMobile Safari

Ios Problem Overview


I guess the subject says it all. I have a web application when viewed on an Iphone, Ipod or Ipad, input submit buttons have rounded corners. Is there a way to stop this?

Ios Solutions


Solution 1 - Ios

If you add...

input, textarea {
  -webkit-appearance: none;
  border-radius: 0;
}

Then your buttons will inherit any CSS styles that you have applied for other browsers.

Solution 2 - Ios

Didn't work for me, the -webkit-appearance:none.

This does:

input[type=submit] {
    -webkit-border-radius:0px;
}

I had the same issue with rounded corners on a button with background image, just on the iPhone.

Solution 3 - Ios

You can try to use following CSS:

-webkit-appearance:none;

More info: http://trentwalton.com/2010/07/14/css-webkit-appearance/

Solution 4 - Ios

I've found that on iPad 2 you have to use the following:

-webkit-appearance:none;
border-radius: 0;

in your button class.

Solution 5 - Ios

I had a site with an input submit type="image". This vairation of the above fixed the rounded corners:

input[type=image] {
    -webkit-border-radius:0px;
}

Solution 6 - Ios

I've found that setting background: linear-gradient(color1, color2) gets rid of the overly rounded corners on Apple devices and works on all other browsers/platforms I have tried.

Solution 7 - Ios

I solved by adding code for both the "button" and "submit" types:

   input[type="submit"] {
   text-align: center;
        -webkit-appearance:none;
        -webkit-border-radius:0px;
        border-radius:0;
        height:30px;
    }

    input[type="button"] {
        text-align: center;
        -webkit-appearance:none;
        -webkit-border-radius:0px;
        border-radius:0;
        height:30px;
    }

Attributions

All content for this solution is sourced from the original question on Stackoverflow.

The content on this page is licensed under the Attribution-ShareAlike 4.0 International (CC BY-SA 4.0) license.

Content TypeOriginal AuthorOriginal Content on Stackoverflow
QuestionNewbie FletcherView Question on Stackoverflow
Solution 1 - IosmethodofactionView Answer on Stackoverflow
Solution 2 - IosRoelView Answer on Stackoverflow
Solution 3 - IosdthukkaView Answer on Stackoverflow
Solution 4 - IosDaniele F.View Answer on Stackoverflow
Solution 5 - IosRevConceptView Answer on Stackoverflow
Solution 6 - IosmaitView Answer on Stackoverflow
Solution 7 - IosAGalvisView Answer on Stackoverflow