【发布时间】:2012-05-31 02:55:19
【问题描述】:
我正在使用 css 设置文本输入和文本区域的宽度:
input[type=text],
input[type=file],
textarea {
width: 305px;
}
由于某些原因,在 Firefox 中,文本区域的宽度显得更短:
在 safari 和 chrome 中运行良好。我该如何解决这个问题?
解决方案:
如此处所述: Unable to set textarea width with CSS 添加:
padding: 0;
border: 1px solid #ccc;
成功了。
【问题讨论】:
-
在我回答之后,我意识到我们这里有一个类似的问题:stackoverflow.com/questions/509529/…
标签: html css firefox cross-browser