How to make a textbox and a textarea same width cross-browsers?

前端 未结 8 1551
孤街浪徒
孤街浪徒 2021-02-19 22:23

Setting the width of both the textbox (ie. input type=\"text\") and the textarea to 500px doesn\'t work in IE6 and Chrome, only works fine in FF2 (haven\'t tested other browsers

8条回答
  •  滥情空心
    2021-02-19 22:52

    You need to explicitly set a border of 1px and make the width 498px, or make the border 0 and the width 500px, although the latter will make the input impossible to see unless you know it's there, so from there it's just a styling issue.

提交回复
热议问题