Re: textarea wrapping

by "Kehvan M. Zydhek" <kehvan(at)zydhek.net>

 Date:  Mon, 5 Jun 2000 13:23:37 -0700
 To:  <KeithWBell(at)aol.com>,
<ssegarra(at)mitre.org>,
<hwg-techniques(at)hwg.org>
 References:  aol
  todo: View Thread, Original
<textarea class="in455" cols="36" rows="3" name="specneeds"
wrap="virtual"></textarea>

The above is from an actual online page, and it works in all the browsers I
test for, degrading quite acceptably in older browsers.

The wrap="virtual" was found in one of my books (Web Design & Development
Black Book, by Scott Jarol and Marisa Pe�a, published by Coriolis Book
Books, copyright 1998), and makes IE and Netscape wrap all lines. HomeSite
4.5.1 also shows options for wrap being OFF (default in NS), SOFT (default
in IE), or HARD. The book also lists PHYSICAL as a possible attribute, where
CRs are sent with the form where the lines break in the textarea box.

The class attribute links to a stylesheet that defines this textarea to a
specific pixel-width in IE, which is pretty close to the cols width rendered
by Netscape (it also uses another style tag for all input regions to use a
common font for all browsers, rather than browser defaults, to make the
boxes about the same size in all).

Hope this helps,
Kehvan M. Zydhek

----- Original Message -----
From: <KeithWBell(at)aol.com>
To: <ssegarra(at)mitre.org>; <hwg-techniques(at)hwg.org>
Sent: Monday, June 05, 2000 8:40 AM
Subject: Re: textarea wrapping


> In a message dated 05/06/00 16:00:49 GMT Daylight Time, ssegarra(at)mitre.org
> writes:
>
> > Is there an attribute to set so that the text a user inputs into a
> >  textarea wraps?  I looked at the 4.0 specification for textareas, but I
> >  didn't see anything.
>
> Steve, whether text entered into TEXTAREA boxes wraps or not depends on
the
> browser, and indeed that fits with the HTML 4.01 spec which says (from
clause
> 17.7, relating to the COLS attribute):
>
> "User agents may wrap visible text lines to keep long lines visible
without
> the need for scrolling."
>
> Note the word "MAY" - not "must" or "shall". So some browsers do wrap,
others
> don't. I don't know of any way to force wrapping in a browser that
doesn't.
>
> Regards
> Keith Bell
>

HWG hwg-techniques mailing list archives, maintained by Webmasters @ IWA