Word wrap control in XHTML textareas? (CSS)

by "Alexander J. Vincent" <jscript(at)pacbell.net>

 Date:  Wed, 19 Sep 2001 07:09:59 -0700
 To:  hwg-techniques(at)hwg.org
  todo: View Thread, Original
    Netscape and Internet Explorer support for textareas a wrap attribute.
This allows the developer to specify how the page should word-wrap the
contents of the textarea.  This is important, if I want to specify a
horizontally scrolling bar or force the words to wrap.

    However, the wrap attribute is not part of HTML 4.0 or XHTML 1.0.  So
I'm wondering what the correct procedures would be for controlling the word
wrap inside a textarea are.

    A friend has suggested the following:  <textarea
style="white-space:nowrap"></textarea>.  That works if the textarea has
block-level styling.  The W3C does not appear to have a normative styling
for HTML elements; in the CSS Level 2 Recommendation, the textarea element
is absent.

    Are my friend and I following the correct path?  Or is there some other
CSS approach to this question, which would remain valid XHTML+CSS?

Alex Vincent
Vallejo, CA

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