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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 25, 20262026-05-25T13:03:59+00:00 2026-05-25T13:03:59+00:00

I’m working on my first ASP.NET MVC 3 app and I’ve got a page

  • 0

I’m working on my first ASP.NET MVC 3 app and I’ve got a page that utilizes a table to display two columns of input elements. It looks something like this:

<table>
  <tr>
    <th> Description </th>
    <th> List </th>
  </tr>
  <tr>
    <td> @Html.TextAreaFor(model => model.Description, new { @class = "vert-stretch-edit" })   
   </td>
    <td rowspan="9"> @Html.EditorFor(model => model.Ingredients) </td>
  </tr>
  <tr>
    <th> Name</th>
  </tr>
  <tr>
    <td> @Html.EditorFor(model => model.Name) </td>
  </tr>
</table>

There are more rows than I’m showing here but the idea here is that the Ingredients span 9 rows in the second column and the first column has a bunch of rows made up of headers and entry elements.

This works well enough except that I cannot make the TextAreaFor element take up the entire height of the <td> that contains it. The table stretches out the rows a bit due to the number of items displayed in the Ingredients list, which isn’t ideal but isn’t horrible in my mind either.

I’ve tried to set the vert-stretch-edit like so:

.vert-stretch-edit
{
   width: 100%;
   height: 100%;
}

but that doesn’t solve anything vertically for me. I’ve also tried this:

.vert-stretch-edit
{
   width: 100%;
   height: 200px;
}

but that’s less that ideal as I don’t really know that 200px is the correct height, particularly since the list of Ingredients is somewhat variable in length. This all feels quite awkward and wrong. Ultimately what I want to accomplish is have a two-column display where my Ingredients list of checkboxes is as long as it needs to be and my data entry elements take up whatever height they need with the balance of the space taken up by the ice cream’s description TextAreaFor element. I kind of like the <table> idea because it lays things out (generally) in a nice way. I find myself struggling with <div>s to make them mimic tables so I avoid them for this type of layout. I suspect this may just be my limited experience using <div>s in this manner. How would you improve this? I’m certainly open to using <div>s instead of <table> if that’s the only way to accomplish this, though I get frustrated trying to make them do what I want.

  • 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-25T13:04:00+00:00Added an answer on May 25, 2026 at 1:04 pm

    I’ve landed upon using the autoresize.jquery.js jQuery plugin which works quite well for my needs. you can get it here (See below)

    Essentially, you reference the TextArea that you which to apply autoResize to by doing this:

    $(myselector).autoResize();

    So, for example I could have a TextArea in my view like so:

    @Html.TextAreaFor(model => model.Notes, new { @id='mynotes' })

    and then do this:

    <script javascript>
    $(document).ready(function() {
      $('#mynotes').autoResize();
    });
    

    and the TextArea will auto-expand as the user types. I haven’t exhaustively tested this out but it seems to fit the bill for my pages.


    Apparently the link to the plug-in by James Padolsey is now dead.
    You may want to try this plug-in as an alternative. It is evidently based on the original.

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

Sidebar

Related Questions

That's pretty much it. I'm using Nokogiri to scrape a web page what has
I've got a string that has curly quotes in it. I'd like to replace
I'm parsing an RSS feed that has an &#8217; in it. SimpleXML turns this
We're building an app, our first using Rails 3, and we're having to build
I'm making a simple page using Google Maps API 3. My first. One marker
I'm working with an upstream system that sometimes sends me text destined for HTML/XML
link Im having trouble converting the html entites into html characters, (&# 8217;) i
I am trying to understand how to use SyndicationItem to display feed which is
Basically, what I'm trying to create is a page of div tags, each has
I have a string like this: La Torre Eiffel paragonata all&#8217;Everest What PHP function

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.