XML, Perl, Python, and other languages can be discussed here, even if it isn't PHP (We might forgive you).
Moderator: General Moderators
mchaggis
Forum Contributor
Posts: 150 Joined: Mon Mar 24, 2003 10:31 am
Location: UK
Post
by mchaggis » Wed Nov 19, 2003 4:12 pm
Hi,
I know that it is possible to make a textarea stretch to the whole width of a page by using css in the following fashion:
Code: Select all
<textarea rows="15" cols="15" name="textarea" style="width: 100%"><textarea>
But attempting style="width: 100%; height: 100%" doesn't seem to do anything?
Thus my question, does anyone know how and if it's possible to stretch a text area to fill a given space height wise?
Thanks in advance
microthick
Forum Regular
Posts: 543 Joined: Wed Sep 24, 2003 2:15 pm
Location: Vancouver, BC
Post
by microthick » Wed Nov 19, 2003 4:38 pm
Well, using styles to make width and height 100% does work for Firebird and probably Netscape 7. : )
The only way I can think of making it work for IE would be to use JavaScript to get the innerWidth and innerHeight of the window, then using some fun calculation, guesstimate the number of rows to fill the height and document.write that to your textarea tag in the rows attribute.
This link:
http://forums.devshed.com/t91765/s.html
has some funky code that might get you started.
mchaggis
Forum Contributor
Posts: 150 Joined: Mon Mar 24, 2003 10:31 am
Location: UK
Post
by mchaggis » Wed Nov 19, 2003 4:56 pm
nope, netscape 7.1 (under linux) doesn't seem to have much affect
Ta for the link tho.... seems to have some useful stuff