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

前端 未结 8 1558
孤街浪徒
孤街浪徒 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:59

    You might have some luck using a set of reset styles in your CSS. They go a long way to eliminating the cross-browser differences between the way elements are rendered.

    Eric Meyer (one of the web's best minds on CSS) describes reset styles and why he uses them here -- with his latest version here.

    That said, without knowing the overall effect you're trying to achieve, form elements are notoriously difficult to style in a way that is perfectly consistent across browser platforms. Best of luck. :)

提交回复
热议问题