Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Westi on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Textarea with 100% style appended

Status
Not open for further replies.

altendew

Programmer
Mar 29, 2005
154
US
Hi I have a text box set to..

Code:
<textarea style="width: 100%" rows="5" name="refCode"></textarea>

Now say this textarea is in a table thats 500 pixels, and the textarea contains the string "sljfspejfesfnwsnsoenvesnvoisengoisnvoisneoivnseoiviosenvoisenoivnseoinvoisenvoisenvoinoiq3noin32oinsfsfsdfsdfsdfsdfsdf".

Code:
<table width="500">
<tr>
<td>
  <textarea style="width: 100%" rows="5" name="refCode">sljfspejfesfnwsnsoenvesnvoisengoisnvoisneoivnseoiviosenvoisenoivnseoinvoisenvoisenvoinoiq3noin32oinsfsfsdfsdfsdfsdfsdf</textarea>
</td>
</tr>
</table>

Now since the width is set to a percentage the textarea will expand the table more than 500 pixels. How do I fix this??
 
Code:
<table width="500">
<tr>
<td>
  <textarea style="width: 100%" rows="5" name="refCode" wrap="VIRTUAL">sljfspejfesfnwsnsoenvesnvoisengoisnvoisneoivnseoiviosenvoisenoivnseoinvoisenvoisenvoinoiq3noin32oinsfsfsdfsdfsdfsdfsdf</textarea>
</td>
</tr>
</table>

The above works in my test.

[cheers]
Cheers!
Laura
 
I just tried that and it still didnt work on my site, can you give me a URL to where you did this??
 
Well i fixed it by using

Code:
style="width: 500px"
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top