W3C home > Mailing lists > Public > www-html@w3.org > February 2000

Re: text input form resize

From: Andy Waite <andy@mailroute.com>
Date: Mon, 28 Feb 2000 08:34:20 +0000
Message-Id: <4.2.0.58.20000228083314.00a1e310@pop3.demon.co.uk>
To: "Yude.Hu" <yude.hu@zoomsystems.com>
Cc: www-html@w3.org
At 11:29 28/02/2000 +1100, you wrote:
>Hi,
>
>Sorry for asking the following question if it is not appropriate to this
>list. Is it possible to resize the length of the text input display
>based on current window width? The size of the text input does not
>accept a function, the following initial statement only made one
>character length of the text input.
>
>.............
><script language = JavaScript>
>function getSize ()
>{
>     return Math.floor (innerWidth / 20);
>}
></script>
><form>
><input type = text size = "getSize ()">
>..............
>
>Thank you.
>
>yh

You can use CSS1 to control the width, e.g.

<input type="text" style="width: 50%;">
Received on Monday, 28 February 2000 03:37:46 GMT

This archive was generated by hypermail 2.2.0+W3C-0.50 : Tuesday, 27 March 2012 18:15:42 GMT