开发者

use cols/rows or style-width/height to specify dimensions of textarea? [duplicate]

开发者 https://www.devze.com 2023-02-11 08:05 出处:网络
This question already has answers here: Should I size a t开发者_运维知识库extarea with CSS width / height or HTML cols / rows attributes?
This question already has answers here: Should I size a t开发者_运维知识库extarea with CSS width / height or HTML cols / rows attributes? (13 answers) Closed 8 years ago.

what is considered best practice when specifying the dimensions of an HTML textarea? only using cols/rows (which i think are mandatory with html strict 4.01) or specifying width and height using css properties? or even setting cols/rows for validity and then overriding the actual size using css?


Please see this question: Should I size a textarea with CSS width / height or HTML cols / rows attributes?

I agree with the top answer. You use rows/cols in case CSS is not supported; if width or height are specified using CSS, they override the value derived from rows/cols.

0

精彩评论

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

关注公众号