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 6745855
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 26, 20262026-05-26T12:15:14+00:00 2026-05-26T12:15:14+00:00

I have a textarea tag that has text I want a user to edit.

  • 0

I have a textarea tag that has text I want a user to edit. The textarea tag is wrapped inside a div like so:

div.container {
   width: 295px;
   max-height: 250px;
   overflow: auto;
   position: relative;
   border: 1px solid: #EEEEEE;
}
textarea {
   width: 270px;
   height: 100%;
   resize: none;
   overflow: hidden;
   border: none;
}

<div class="container">
   <textarea id="overview">
      blah blah....
   </textarea>
</div>

The div has a fixed width, a max height and shows scroll bars when the height is too large. All this is fine, but how can I get the textarea to expand to 100%? It’s currently only two lines tall and doesn’t expand to show all the text when I have a lot of text inside it. Please see this fiddle to see what I’m talking about.

  • 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-05-26T12:15:14+00:00Added an answer on May 26, 2026 at 12:15 pm

    Your div.container needs an explicit height specified. Child contents won’t expand up to a max-height, just height.

    Something like this:
    http://jsfiddle.net/dpF7k/
    or more simply applying directly to the textarea instead of a wrapping div: http://jsfiddle.net/ujKCf/

    The only thing that is missing is that it does not shrink below 250px if there is less content.

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

Sidebar

Related Questions

I have textarea in my site(link shortening site) i want to user enter some
I have a textarea that I might want to disable in certain conditions. I
I have a textarea that I'm able to edit with the jeditable plugin but
I have a <div id=comment_posting_holder> tag that holds a form with two elements: a
I have a user form with a textarea that allows users to submit html
I've a doubt. Lets consider that we have a div of width 200px. If
I have a textarea and among free text input I insert some tags that
I have a javascript that is to be used to tag text in a
What I am making is basically is a user profile that has a text
I have a HTML Tag <textarea>$FOO</textarea> and the $FOO Variable will be filled with

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.