Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

border-radius issue with input type text

Tags:

html

css

I have this issue with <input type="text">where I see some extra border in top and left of the input box.

I have this CSS code -

#add{
      width: 60%;
      height: 25px;
      margin: 0 auto;
      border: auto;
      border-radius: 10px;
    }

I am attaching the screenshot from chrome. Firefox shows the same thing.Google Chrome Screen Shot

like image 483
Varun Avatar asked Sep 27 '13 11:09

Varun


People also ask

Why border-radius is not working?

If there are contents within the div that has the curved corners, you have to set overflow: hidden because otherwise the child div's overflow can give the impression that the border-radius isn't working.

How do you make a text box with rounded corners in CSS?

To create a simple box with rounded corners, add the border-radius property to box1 . The border-radius property is a shorthand property that sets the radius for all four corners of the box to the same value when given only one value.


1 Answers

Try

    #add{
      width: 60%;
      height: 25px;
      margin: 0 auto;
      border: none; /* <-- This thing here */
      border:solid 1px #ccc;
      border-radius: 10px;
    }

By setting it to border:none the default css of the text field will be gone and your ready to style it for yourself.

Demo

like image 119
Jo E. Avatar answered Oct 01 '22 15:10

Jo E.