This is Interesting: Free Magazines for Graphics designers and webmasters  


Home > Archive > Stylesheets > October 2007 > resizable textarea?





You are viewing an archived Text-only version of the thread. To view this thread in it's original format and/or if you want to reply to this thread please [click here]

Author resizable textarea?
ivowel@gmail.com

2007-10-13, 6:16 pm


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

Chris F.A. Johnson

2007-10-13, 6:16 pm

On 2007-10-13, ivowel@XXXXXXXXXX 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)
Jukka K. Korpela

2007-10-14, 6:17 pm

Scripsit Chris F.A. Johnson:

>
> 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/

Sponsored Links


Copyright 2003 - 2008 forum4designers.com  Software forum  Computer Hardware reviews