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 wOOdy-Soft on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

resize window - resize textarea

Status
Not open for further replies.

codeone

Programmer
Mar 25, 2003
343
US
Hey,
was wondering how to have a textarea auto resize when the browser window is manually resized or restored down or restored up and maxed...

I guess something that fires up ondrag which would be in the body tag like so...:

EX:

<body ondrag="autoResize()">

...Would be the idea way to call the script. Anyone know a way to allow me to keep 2 px away from the right and left side of the window chrome and also allow for the textarea to resize when the user resizes the window?

all help much appreciated,

co

 
hey,
nevermind figured that one out fast...

just used the % sign...
 

Better done with CSS I would've thought.

Code:
<div style="padding: 0px 2px;">
<textarea style="width: 100%;">

</textarea>
</div>

That assumes you've no body margin/padding of course.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top