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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 29, 20262026-05-29T05:46:02+00:00 2026-05-29T05:46:02+00:00

I am trying to figure out a way to resize a text area using

  • 0

I am trying to figure out a way to resize a text area using JQM when the device rotates. Basically, I have a text area that looks good when it loads, whether in portrait or landscape, but when the device is rotated, it does not resize. Here is a bit of what the code looks like:

.message-entry{
   margin-left:10px;
   margin-right:0;
   margin-bottom:-20px;
}

and the HTML:

 <footer data-role="footer" id="footer" data-theme="b" data-position="fixed">               
            <label class="label-message-entry" for="chatMessageEntry">Enter a message:</label>
            <textarea rows="8" name="textarea" class="message-entry" id="chatMessageEntry"></textarea>
            <a id="chatReplyButton" class="reply-button" data-role="button" data-icon="plus">Reply</a>              
        </footer> <!--end footer--> 

and then the orientationchange event:

$(window).bind( 'orientationchange', function(e){
        var newWidth = $(window).width();
        $('.message-entry').css({'width':newWidth + 'px'});     
});

any ideas? Thanks!

  • 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-29T05:46:05+00:00Added an answer on May 29, 2026 at 5:46 am

    Have you tried giving the textarea a min-width within a media query?

    @media all and (max-width: 480px) and (min-width: 321px){
        .message-entry{
            min-width:470px;
        }
    }
    @media all and (max-width: 320px){
        .message-entry{
            min-width:310px;
        }
    }
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I'm trying to figure out a way to detect files that are not opened
I'm trying to figure out a way to format a date string that sits
I'm trying to figure out how to have a div dynamically resize, based on
I'm trying to figure out a way to select elements that are overlapped (and
Trying to figure out a way to throw out attributes in this data that
we're trying to figure out a way to build a .NET application that can
I'm trying to figure out a way to have a selected button/item extend past
I'm trying to figure out a way to add a self-update feature to a
I'm trying to figure out a way to automatically cast something to an Action
I am trying to figure out a way to pre-process few things before my

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.