Re: basic textarea question

Discussion in 'HTML' started by Jukka K. Korpela, Jul 15, 2003.

  1. "bbxrider" <> wrote:

    > maybe its from my editor, easyhtml


    Probably not.

    > when i create a textarea with say 3 lines showing, the bottom of
    > the textarea box lines up the current line,


    That's natural, since a textarea element is a "text level" or "inline"
    element, treated by the browser as if it were one _big_ letter, so to
    say.

    > it looks akward and out of place, how can i get
    > the top of the textarea box to line
    > up with current line


    Perhaps the simplest way is to use
    textarea { vertical-align: top; }
    in a style sheet. Other options include using a table, with the prompt
    in one cell and the textarea in another, with valign="top" attributes
    in the <td> elements.

    On the other hand, I think it's normally best to put the prompt for a
    textarea on a line of its own right before the textarea. This avoids
    the problem:

    <div><label for="ta">prompt</label></div>
    <div><textarea id="ta" ...></textarea></div>

    --
    Yucca, http://www.cs.tut.fi/~jkorpela/
    Pages about Web authoring: http://www.cs.tut.fi/~jkorpela/www.html
     
    Jukka K. Korpela, Jul 15, 2003
    #1
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Engineer
    Replies:
    6
    Views:
    672
    Jeremy Bowers
    May 1, 2005
  2. Replies:
    0
    Views:
    473
  3. Augustus
    Replies:
    1
    Views:
    398
    Ken Schaefer
    Sep 10, 2003
  4. Textarea Inside of a textarea

    , Feb 4, 2006, in forum: ASP General
    Replies:
    6
    Views:
    362
    Anthony Jones
    Feb 5, 2006
  5. Replies:
    1
    Views:
    357
    Bart Van der Donck
    Jul 4, 2007
Loading...

Share This Page