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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 14, 20262026-06-14T11:25:30+00:00 2026-06-14T11:25:30+00:00

if i move the resize to right near the #holder width ,then the resize

  • 0

if i move the resize to right near the #holder width ,then the resize can reach wider than the #holder width. that means the containment constraint take no effect now!
how can I do to make it work as normal???? thanks a lot!
precondition: I must keep the style of container .overflow:auto;position:relative …etc.
they must be kept for some reason.

below is the code:

 <!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="utf-8">
    <title>jQuery UI Resizable - Constrain resize area</title>
    <link rel="stylesheet" href="http://jqueryui.com//themes/base/jquery.ui.all.css">
    <script src="http://jqueryui.com//jquery-1.8.0.js"></script>
    <script src="http://jqueryui.com//ui/jquery.ui.core.js"></script>
    <script src="http://jqueryui.com//ui/jquery.ui.widget.js"></script>
    <script src="http://jqueryui.com//ui/jquery.ui.mouse.js"></script>
    <script src="http://jqueryui.com//ui/jquery.ui.resizable.js"></script>
     <script src="http://jqueryui.com//ui/jquery.ui.draggable.js"></script>
    <link rel="stylesheet" href="../demos.css">
    <style>
    #container { width: 500px; height: 500px;overflow:auto;position:relative }
    #container h3 { text-align: center; margin: 0; margin-bottom: 10px; }
    #resizable {   width: 150px; height: 150px;left:80px;top:50px;background-color:red;border:2px }
    #resizable, #container { padding: 0.5em; }
    #gap { width: 1000px; height: 1000px; position:absolute;left:0;top:0;  }
    #holder { width: 800px; height: 800px; position:absolute;left:0;top:0;  }
    </style>
    <script>
    $(function() {
        $( "#resizable" ).resizable({
            containment: "#holder"
        });
         $( "#resizable" ).draggable({
            containment: "#holder"
        });

    });
    </script>
</head>
<body>

<div class="demo">
<textarea cols=120 rows=10>dddddddddddddddddddddddd</textarea>
<input type=text value="ddddddddddddddddddddddddd"/>
<div style="width:500px;height:600px">
<div id="container" class="ui-widget-content">
    <h3 class="ui-widget-header">Containment</h3>

    <div id="gap" class="ui-widget-content">
 <div id="holder" class="ui-widget-content">
    </div>
    <div id="resizable"  >
        <h3 class="ui-widget-header">Resizable</h3>
    </div>
    </div>
</div>
</div> 
</div><!-- End demo -->



<div class="demo-description">
<p>Define the boundaries of the resizable area. Use the <code>containment</code> option to specify a parent DOM element or a jQuery selector, like 'document.'</p>
</div><!-- End demo-description -->

</body>
</html>
  • 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-06-14T11:25:32+00:00Added an answer on June 14, 2026 at 11:25 am

    You need a theme to run this code.

    In my computer, I just changed

    <link rel="stylesheet" href="../demos.css">
    

    with

    <link rel="stylesheet" href="~/Content/ui-lightness_1.8.24/jquery-ui-1.8.24.custom.css" />
    

    and it rocks. As an example, download the theme ui-lightness_1.8.24, change your demo css with it and try again.

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

Sidebar

Related Questions

I have a custom canvas that I can drop controls on, move, and resize.
I have following using Jquery and somehow I can resize it the right bottom
How can we move our existing ASP .Net 2.0 application to the cloud platform
how can I fix this problem on Internet Explorer 7: If I resize the
I've got a Google Maps loaded in a div that is 100% the width
I am building an multiple file upload form that user can use to upload
If you view this in Firefox, you'll see that the bottom footer stays right
Im trying to achive a slideshow that looks like this http://ge.tt/api/1/files/2AjKcVM/0/blob/x675?noinc=1 where the width
I'm trying to make a timeline view that shows events as UIButtons that can
I have the following layout: <div style=float:right ...>Contents</div> <table>contents</table> I want that the div

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.