Chrome: Shape frame radius is different from Firefox

I have HTML / CSS that works fine in Firefox; however in Chrome, the shape / border is compressed! I play with the code for several hours to no avail. Can anybody help? Thank!

Here is the fiddle: http://jsfiddle.net/W22DC/19/

Or, if you want, the code below ...

CSS:

.form1 input{
font-weight:normal;
font-size:100%;
border: 2px solid purple;
-moz-border-radius:15px;
-khtml-border-radius:15px;
-webkit-border-radius:15px;
border-radius:15px 15px 15px 15px;
background-color:transparent;    
padding: 2px 6px 2px 6px;
}
.form1 input:hover, input:focus{
border: 2px solid black;
cursor:pointer;
}

HTML:

<br />
<div class="form1" align="center"><form name="Example" action="" method="post" style="margin-bottom: 0">
<input type="submit" name="submit" value="7" />
</form></div>
<br />
+3
source share
1 answer

This is a well-known chrome bug at the inputs, and you cannot have a border radius that adds more than the height of the element. If you want it to be perfectly round, make sure the dimensions are accurate.

eg. The code:

.form1 input{
    font-weight:normal;
    font-size:100%;
    border: 2px solid purple;
    -moz-border-radius:15px;
    -khtml-border-radius:15px;
    -webkit-border-radius:15px;
    border-radius:15px;
    background-color:transparent;        
    padding:0;
    height:30px;
    width:30px;
    line-height:28px;
    text-align:center;
}
    .form1 input:hover, input:focus{
    border: 2px solid black;
    cursor:pointer;
}

For a border radius of 15px you need an element that must be at least 30px x 30px.

Paul.

+2

All Articles