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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 11, 20262026-05-11T15:11:31+00:00 2026-05-11T15:11:31+00:00

I have a MultiLine asp:Textbox (a standard html textarea for those non-asp people) that

  • 0

I have a MultiLine asp:Textbox (a standard html textarea for those non-asp people) that I want to be auto-sized to fit all it’s content only through css. The reason for this is that I want it to be of a specified height in the web browser, with scrolling enabled.

I have implemented a print style sheet however and want all text located in the textarea to be displayed when printed with no overflow hidden.

I can manually specify the height of the textarea in the print.css file problem with this being that the fields are optional and a 350px blank box is not optimal and there is always the possibility of a larger amount of text than this…

I have tried using :

height: auto; height: 100%; 

In IE and Firefox respectively yet these seem to be overridden by the presence of a specified number of rows in the html mark-up for the form which must be generated by .NET when you do not specify a height on the asp:Textbox tag, this seems to only accept numercial measurements such as px em etc…

Any ideas?

  • 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. 2026-05-11T15:11:32+00:00Added an answer on May 11, 2026 at 3:11 pm

    What you are asking for (a css solution) is not possible.

    The content of the textarea is not html elements, so it can not be used by css to calculate the size of the textarea.

    The only thing that could work would be Javascript, e.g. reading the scrollHeight property and use that to set the height of the element. Still the scrollHeight property is non-standard, so it might not work in all browsers.

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

Sidebar

Related Questions

I've been attempting to create a resizable textbox (ASP.NET multiline TextBox / HTML textarea
I have an ASP.NET TextBox with TextMode = TextBoxMode.MultiLine that is used within an
I have a multiline textbox : <asp:TextBox ID=txtBody runat=server TextMode=MultiLine Rows=10 Width=95% /> In
I have a multiline textbox that by default, is set to ReadOnly. I would
I have an ASP TextBox with TextMode set to MultiLine. I'm having problems with
I have several <asp:TextBox TextMode=MultiLine> elements on a page. On load, I populate them
I have a single asp:textbox declared as follows: <asp:TextBox ID=textBox1 class=myTB runat=server TextMode=MultiLine Font-Names=Calibri
I have a simple asp:textbox set up like this <asp:TextBox runat=server ID=tbxWarning TextMode=MultiLine Rows=4>
I have a very simple asp:textbox with the multiline attribute enabled. I then accept
i have a asp:TextBox control on the page. i'm setting it to a TextMode=MultiLine,

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.