www.webdeveloper.com
Results 1 to 4 of 4

Thread: height of TEXTAREA

  1. #1
    Join Date
    May 2005
    Posts
    230

    height of TEXTAREA

    Is there any reason why IE will not render TEXTAREA at height 100% under standards compliant doctype (see below)? I have set HTML and BODY height to 100%, but the textarea is still only showing as two lines (unless I specify the height in "px" instead of "%").

    Any thoughts workarounds woud be much appreciated.

    Thanks

    PS: I am using following doctype:
    <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">

  2. #2
    Join Date
    Mar 2007
    Location
    Jeddah (Currently)
    Posts
    157
    HTML Code:
    <style type="text/css">
    textarea          {height:100% ; width:100%}
    </style>

  3. #3
    Join Date
    Jul 2007
    Posts
    113
    Is there any logical reason why IE does this? No.

    Does it behave this way? Yes.

    Set your height in pixels or ems or set rows in the html. Absolutely defined height for text areas is seldom a design limitation.

    height: 100% is so problematic and unintuitive in so many implementations that I almost never use it.

    Some Ajax/JavaScript libraries like MooTools allow you to set resizable text areas. Look at a current Wordpress demo for an example
    Last edited by mactheweb; 07-08-2007 at 12:53 PM.

  4. #4
    Join Date
    Mar 2007
    Location
    Jeddah (Currently)
    Posts
    157
    HTML Code:
    <textarea rows="WTV" cols="WTV"></textarea>

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
HTML5 Development Center



Recent Articles