Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8098605
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 5, 20262026-06-05T22:07:25+00:00 2026-06-05T22:07:25+00:00

http://jsfiddle.net/h2vMN/1/ I have a text box text inside it already, in the actual application

  • 0

http://jsfiddle.net/h2vMN/1/

I have a text box text inside it already, in the actual application this will be filled dynamically, but for the sake of this question it has been pre filled.

<textarea id="textarea">
    Lorem ipsum dolor sit amet, consectetur adipiscing elit. Sed tempor commodo ornare. Donec lobortis dui sed lectus egestas tristique. Vivamus vel metus turpis, faucibus varius risus. Aenean ante mauris, ultrices id facilisis vitae, dignissim eget sem. Quisque sed justo lectus, eget aliquet leo. Curabitur in mauris et diam fermentum venenatis. Proin ullamcorper, neque a vehicula euismod, odio enim aliquam ipsum, eu tristique urna sapien nec erat.

Aliquam erat volutpat. In in lacus cursus dolor pellentesque posuere. Cras eu metus urna, a rhoncus ligula. Ut hendrerit orci in arcu dignissim id fermentum orci vulputate. Sed ante ligula, volutpat eu convallis vel, auctor in metus. Mauris euismod, metus eget venenatis sodales, risus tellus volutpat elit, et aliquet massa tellus ut sapien. Mauris tempor posuere massa et consectetur. Duis dignissim enim a nulla ultricies vitae vulputate felis commodo. Phasellus mollis est eget odio porttitor consequat. Vestibulum ante ipsum primis in faucibus orci luctus et ultrices posuere cubilia Curae; Phasellus ut nibh auctor libero sagittis semper vitae quis erat.
</textarea>​

When I run the above code, it shows a tiny text area with scroll bars all over it. In other words, completely useless in terms of being user friendly. How do I automatically resize the text box according to the amount of content their is and it has a set width of 600px.

#textarea{width:600px;}​

I would like a javascript/jquery solution.

I have tried the .autoresize solution unsuccessfully, which can be found here:

http://james.padolsey.com/demos/plugins/jQuery/autoresize.jquery.js/view

Note, the height should be resized automatically

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-05T22:07:28+00:00Added an answer on June 5, 2026 at 10:07 pm

    Thy this:

    $(document).ready(function(){
        tx = $('#textarea')
        tx.height(tx.prop('scrollHeight'));
    })
    

    DEMO

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

http://jsfiddle.net/xysxD/11/ if you check the jsfiddle Will have a comment text that slide toggle
http://jsfiddle.net/9BCrs/5/ I have this set up to load a file into a DIV using
http://jsfiddle.net/zUAQC/11/ In this sample, In javascipt box's sampleDiv,I add the next input checkbox .
http://jsfiddle.net/2CkKW/5/ I'm trying to have a button for comments in which you will press
http://jsfiddle.net/AndyMP/nUhhf/1/ This is a simplified situation where I have a DIV that animates downwards
http://jsfiddle.net/AYPze/9/ In this example I have two similar divs with the same goal. Bind
http://jsfiddle.net/Lqvcr/53/ This is so damn basic and I have no idea how to make
http://jsfiddle.net/9aaNh/ Please check this Fiddle. I am having problem with spacing in between text
http://jsfiddle.net/studioband/pG87G/6/ This link is apart of a website that I am designing. I have
http://jsfiddle.net/55Ruh/9/ . Red box doesn't get bigger even if I enter text. <div class=box

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.