468,290 Members | 2,028 Online
Bytes | Developer Community
New Post

Home Posts Topics Members FAQ

Post your question to a community of 468,290 developers. It's quick & easy.

resizable textarea?


dear experts: is it possible to define in plain html (perhaps with
css) a textarea in a form that expands over the entire width of a
browser window? sincerely, /iaw

Oct 13 '07 #1
2 3350
On 2007-10-13, iv****@gmail.com wrote:
>
dear experts: is it possible to define in plain html (perhaps with
css) a textarea in a form that expands over the entire width of a
browser window?
Use CSS:

textarea {
width: 100%;
height: 100%;
}

--
Chris F.A. Johnson <http://cfaj.freeshell.org>
================================================== =================
Author:
Shell Scripting Recipes: A Problem-Solution Approach (2005, Apress)
Oct 13 '07 #2
Scripsit Chris F.A. Johnson:
>dear experts: is it possible to define in plain html (perhaps with
css) a textarea in a form that expands over the entire width of a
browser window?

Use CSS:

textarea {
width: 100%;
height: 100%;
}
There was no request for filling the entire _height_ (which would have been
rather absurd). So

textarea { width: 100%; }

is the answer - except that there will still be page margins, so that the
area does not quite expand over the entire width. To make the margins
disappear (with the usual caveats) you would use

html, body { margin: 0; padding: 0; }

but then you would need to add any margins that you really want to have.

Expanding over the width of a window is seldom a good idea, though.
Expanding over the body width is better, and you get that with just textarea
{ width: 100%; }.

--
Jukka K. Korpela ("Yucca")
http://www.cs.tut.fi/~jkorpela/

Oct 14 '07 #3

This discussion thread is closed

Replies have been disabled for this discussion.

Similar topics

4 posts views Thread by Csaba Gabor | last post: by
4 posts views Thread by TJS | last post: by
4 posts views Thread by sam.s.kong | last post: by
4 posts views Thread by bbcrock | last post: by
3 posts views Thread by Al Henderson | last post: by
3 posts views Thread by Thierry Loiseau | last post: by
reply views Thread by NPC403 | last post: by
2 posts views Thread by MrBee | last post: by
By using this site, you agree to our Privacy Policy and Terms of Use.