如何摆脱 Chrome 和 Firefox 中的文本表单边框?

How to get rid of text form borders in Chrome and Firefox?

我在 HTML 和 CSS 中创建了一些文本表单,它们在 Safari 中似乎工作得很好,但在 Firefox 和 Chrome 中它们看起来像它们周围有 1 到 2 像素的白色边框。这是该浏览器样式的默认设置吗?我该如何摆脱它?

这是我的 CSS 仅供参考....

.forms input[type="text"] {
display:block;
margin: 0 auto;
margin-bottom: 10px;
background-color:#3a3a3a;
color: white;
padding-right:30px;
font-family:inherit;
text-transform:uppercase;
font-size:14px;
height:50px;
width:540px;
}
.shortForms input[type="text"] {
display:inline-block;
margin: 0 auto;
margin-bottom: 10px;
background-color:#3a3a3a;
color: white;
font-family:inherit;
text-transform:uppercase;
font-size:14px;
height:50px;
width:242px; 
}

这是一个黑色背景的页面,文本字段为浅灰色,带有白色占位符文本。

在此先感谢您的帮助!

尝试添加

fieldset { border: 0px; }

给你的 CSS.