Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

input type search border-radius issue in Google Chrome

I have an <input type="search"/> element (no other HTML).

Here's the CSS:

input[type=search] {
    border: 1px solid #000;
    padding: 4px 12px;
    border-radius: 8px;
}

In Firefox 7 it looks great:

Rounded corners on input element in Firefox 7

However, in Chrome 15 the rounded corners are cut off:

enter image description here

View jsFiddle

Any way I can fix this?

like image 925
Web_Designer Avatar asked Nov 01 '11 07:11

Web_Designer


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. This answer worked for me.

Which CSS type is used to set the border-radius?

The border-radius CSS property rounds the corners of an element's outer border edge. You can set a single radius to make circular corners, or two radii to make elliptical corners.


1 Answers

You just need to add -webkit-appearance: none to fix it.

like image 193
Knu Avatar answered Sep 28 '22 19:09

Knu