SitePoint Sponsor

User Tag List

Results 1 to 7 of 7

Thread: comment box

  1. #1
    SitePoint Enthusiast
    Join Date
    Dec 2012
    Posts
    25
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    comment box

    hi
    I use this tutorial (http://www.quackit.com/html/codes/comment_box_code.cfm) to create a comment box.
    I've tried to change the textarea to be {height :auto} in order to remove the scroll from the textarea,
    but that doesn't work.
    I don't want to have a scroll in the textarea.
    What can I do??!
    Thanks

  2. #2
    It's all Geek to me silver trophybronze trophy
    ralph.m's Avatar
    Join Date
    Mar 2009
    Location
    Melbourne, AU
    Posts
    24,319
    Mentioned
    462 Post(s)
    Tagged
    8 Thread(s)
    Is this something you are seeing in IE? If so, you can remove the scroll bar with this:

    Code:
    textarea {
      overflow: auto;
    }
    (The link you provided is broken.)

  3. #3
    SitePoint Enthusiast
    Join Date
    Dec 2012
    Posts
    25
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Quote Originally Posted by ralph.m View Post
    Is this something you are seeing in IE? If so, you can remove the scroll bar with this:

    Code:
    textarea {
      overflow: auto;
    }
    (The link you provided is broken.)
    It's in chrome
    http://www.quackit.com/html/codes/comment_box_code.cfm

  4. #4
    It's all Geek to me silver trophybronze trophy
    ralph.m's Avatar
    Join Date
    Mar 2009
    Location
    Melbourne, AU
    Posts
    24,319
    Mentioned
    462 Post(s)
    Tagged
    8 Thread(s)
    That link doesn't show scroll in the textarea in Chrome. I think we'll have to see your actual page, or a working example that demonstrates the problem.

  5. #5
    SitePoint Enthusiast
    Join Date
    Dec 2012
    Posts
    25
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Quote Originally Posted by ralph.m View Post
    That link doesn't show scroll in the textarea in Chrome. I think we'll have to see your actual page, or a working example that demonstrates the problem.
    I'm sorry
    But I mean when I'd written a long comment e.g. thirty lines ..
    Will the comment appear in a box that contain a scroll or not(the box will obtain the height depending on the comment length)?
    "I guess I could n't see the result until it's done with php or .asp"
    Again sorry for the ambiguity.

  6. #6
    It's all Geek to me silver trophybronze trophy
    ralph.m's Avatar
    Join Date
    Mar 2009
    Location
    Melbourne, AU
    Posts
    24,319
    Mentioned
    462 Post(s)
    Tagged
    8 Thread(s)
    O, I see what you mean. I don't think there's a way to do what you want with CSS alone, although a lot of browsers allow the user manually to make the textarea larger (with the little handle at the bottom right). But you can use JavaScript to make the textarea expand automatically as more text is added. Here is a jQuery script:

    http://james.padolsey.com/demos/plug...jquery.js/view

    that is recommended by Chris Coyier:

    http://css-tricks.com/textarea-tricks/

  7. #7
    SitePoint Enthusiast
    Join Date
    Dec 2012
    Posts
    25
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    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
  •