开发者

Removing grey border from form input on Chrome

开发者 https://www.devze.com 2023-02-28 06:15 出处:网络
http://i55.tinypic.com/3325gyo.png This grey border appears when you focus on the text field. I\'ve tried outline: 0 which doesn\'t remove it. Any suggestions? Thank开发者_StackOverflow中文版sYou can

http://i55.tinypic.com/3325gyo.png

This grey border appears when you focus on the text field. I've tried outline: 0 which doesn't remove it. Any suggestions? Thank开发者_StackOverflow中文版s


You can do like this:

input:focus {outline: none;}


There is a grey border that is automatic in chrome but it is just a regular border. Get the class or Id of the input and just put border:none; The input:focus as someone else has said is the selector to remove the border on focus. Hope this helps someone, automattic styles can be a nuisance sometimes.


I managed to fix this by styling the tag:

<fieldset>

to border: 0;


As said by allanb in the comments of this answer, the culprit is the css property 'box-shadow':

:focus {
    outline: 0;
    -webkit-box-shadow: none !important;
    -moz-box-shadow: none !important;
    box-shadow: none !important;
}
0

精彩评论

暂无评论...
验证码 换一张
取 消