Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

CSS circles look oval on ios

I created a few circles using CSS that I use as text inputs on my HTML index page. Problem is that when the font inside is relatively large compare to the CSS circle, the circle turns into an oval. It only happens on IOS. I have tested the page on Safari and Chrome and it's perfectly fine. Don't have android devices to test. I have tried using meta flags and webkit properties but no go.

Any hints?

            input[type=text5]{
                    position: absolute;
                    left: 270px;
                    top: 340px;
                    display:block;
                    width:50px;
                    height:50px;
                    line-height:50px;
                    border: 2px solid #f5f5f5;
                    border-radius: 50%;
                    margin:0 auto;
                    color:#f5f5f5;
                    text-align:center;
                    text-decoration:none;
                    background: #464646;
                    box-shadow: 0 0 3px gray;
                    font-family:Verdana;
                    font-size:16px;
                    font-weight:bold;
                    -webkit-box-sizing:content-box;
                    -moz-box-sizing:content-box;
                    box-sizing:content-box;             
            }

Large Font: enter image description here

Small Font enter image description here

like image 964
user3694265 Avatar asked May 31 '14 13:05

user3694265


1 Answers

well guys, I figured out after playing a bit with CSS properties. For some reason iOS was adding padding to the text. Interesting that none of the desktop browsers added padding. In any case adding: padding: 0px; solved it.

like image 166
user3694265 Avatar answered Sep 27 '22 20:09

user3694265