Thursday, June 6, 2024
 Popular · Latest · Hot · Upcoming
74
rated 0 times [  78] [ 4]  / answers: 1 / hits: 17068  / 14 Years ago, sat, july 31, 2010, 12:00:00

Given that we don't know the div's width beforehand?



My idea: Calculate the div 's width with JS, find a way to convert it to cols and the apply the css to the textarea onthe fly. But perhaps there 's no need to reinvent the wheel?



Thank you.


More From » html

 Answers
16

<textarea style=width:100%>* will work in most cases.



If it doesn't, please provide more information!



* Note: for some reason, it will need the cols and rows attributes to validate. But setting a width or a height will override them, so put any value you want.


[#96063] Wednesday, July 28, 2010, 14 Years  [reply] [flag answer]
Only authorized users can answer the question. Please sign in first, or register a free account.
marques

Total Points: 366
Total Questions: 108
Total Answers: 111

Location: Burundi
Member since Wed, Nov 25, 2020
4 Years ago
marques questions
;