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

  • Home
  • SEARCH
  • 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 4118272
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 20, 20262026-05-20T22:56:20+00:00 2026-05-20T22:56:20+00:00

I have a jQuery dialog that pops up and allows the user to send

  • 0

I have a jQuery dialog that pops up and allows the user to send a confirmation email. I have some text, and then a text area. The dialog is expandable and I want the text area to fill up the entire area of the dialog, EXCEPT the 50px or so of height I need at the top to display the text.

Setting the textarea height to 100% correctly allows the textarea to expand/contract with the change in size of the dialog. However, it does not give space at the top for the text.

How do i get the textarea to fill the entire area of the dialog (height and width) EXCEPT the first 50px of height in which my text will reside.

Thanks.

HTML:

<div id="dialog-message-email" title="Send Email">

    <p style="height:50px">
        <span class="ui-icon ui-icon-circle-check" style="float:left; margin:0 7px 50px 0;"></span>
        Confirmation Email to be sent to user.
    </p>
    <div>
    <textarea id="ConfirmEmailText" class="ui-corner-all ui-widget-content" style="height:100%;padding:5px; font-family:Sans-serif; font-size:1.2em;"></textarea>
    </div>

    </div>
  • 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-20T22:56:21+00:00Added an answer on May 20, 2026 at 10:56 pm

    You can use absolute positioning.

    UPDATE: The textarea won’t stretch to its parent when given absolute positioning, so instead I styled the div that is around your textarea, and the textarea will only adjust itself to the div’s dimension.

    See working example here. I played with bottom and right to adjust for the textarea’s border and padding, not the nicest one, might be tweaked, but it works.

    So the basic stuff that makes it work is something like this:

    #dialog-message-email {
        position: relative;
        min-height: 200px; /* the child is absolute, so we need a minimum height */
    }
    
    #dialog-message-email div { /* this one will stretch */
          position: absolute;
          top: 50px;
          bottom: 0;
          left: 0;
          right: 0;
    }
    
    #ConfirmEmailText { /* and the textarea follows its parent's dimensions */
          width: 100%;
          height: 100%;
    }
    

    UPDATE 2: I just stumbled upon a great article that is related, and extends this by masquerading the wrapper as the textarea itself:

    div {
      position: absolute;
      left: 5px; 
      top: 5px;
      right: 5px; 
      bottom: 5px;
      border: 1px solid #CCC; /* style like textarea */
    }
    
    textarea {
      width: 100%;
      height: 100%;
      margin: 0; /* don't want to add to container size */
      border: 0; /* don't want to add to container size */
    }
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have a problem with the jquery-ui dialog box . The problem is that
I have some jQuery/JavaScript code that I want to run only when there is
I am using SimpleModal in jQuery, and I have one confirm dialog. If the
I have a jQuery datepicker that I want to restrict non work days -
I have noticed jQuery (or is it Firefox) will turn some of my <span
I have a script that appends some rows to a table. One of the
I have been looking at jQUery thickbox for showing modal dialogs with images, it
I have a JQueryDialog with a text field, an OK button and a cancel
Say I have jquery code like this: html += '<div class=index>' + item.index +
I'm struggling to find the right terminology here, but if you have jQuery object...

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.