SitePoint Sponsor

User Tag List

Results 1 to 3 of 3
  1. #1
    SitePoint Evangelist
    Join Date
    Jun 2010
    Posts
    453
    Mentioned
    1 Post(s)
    Tagged
    0 Thread(s)

    textarea with an input box

    How do you use <textarea> with an input box?
    I tried this, but it didn't work (obviously), but it seems close to what i need.
    PHP Code:
    echo 'description:<textarea rows="3" cols="30"> <input style="width:275px;height:50px;overflow:scroll;" name="description" value="' $description '" type="text" /> </textarea> '

  2. #2
    It's all Geek to me silver trophybronze trophy
    ralph.m's Avatar
    Join Date
    Mar 2009
    Location
    Melbourne, AU
    Posts
    24,173
    Mentioned
    454 Post(s)
    Tagged
    8 Thread(s)
    The <textarea> element is an input box in its own right, so don't put anything inside it.

    This is the basic code:

    Code:
    <label for="desc">Description</label>
    <textarea id="desc" name="description" rows="3" cols="30">
    </textarea>
    To style the <textarea>, target it in your stylesheet like so:

    Code:
    textarea {
      width:275px;
      height:50px;
      overflow:scroll;
    }

  3. #3
    SitePoint Evangelist
    Join Date
    Jun 2010
    Posts
    453
    Mentioned
    1 Post(s)
    Tagged
    0 Thread(s)
    I understand. Thanks ralph.m.


Bookmarks

Posting Permissions

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