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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 26, 20262026-05-26T23:25:40+00:00 2026-05-26T23:25:40+00:00

I have a page with a 2 column structure. I want to make one

  • 0

I have a page with a 2 column structure.

I want to make one of the two column (a div) resizable using jQuery resize function (http://api.jquery.com/resize/) but i have two problems:

  1. when the left column is resized I want the right one to change a css parameter in relation to how many px the other column has been resized: for example I want to add 3px to the margin of the right column when the left column grows by 3px?

  2. I want to make the div resizable only horizontally and to resize it not using the “resize are” in the bottom-right corner but using a line on the border.

I’ll only post the css code because the html one seems to be “executed”, but there are simple two div .sidebar and .content

.sidebar{
width: 220px;
float: left;
position: fixed;
margin-bottom: 0px;
padding-bottom: 0px;

overflow:auto;
}

.content{
float: right;
position: fixed;
padding-left: 220px;
overflow: auto;
}
  • 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-26T23:25:41+00:00Added an answer on May 26, 2026 at 11:25 pm

    I dont understand your problem, but I guess that you are actually using jQuery UI Resizable (http://jqueryui.com/demos/resizable/), instead of jquery resize (which is an event and not a feature to resize elements). If that is the case, you can define a callback function, that can be fired when your resizing is done.

    something like this:

    var onResized = function(){
      $("#seconddiv").css("width", 300 + (300-$("#yourdiv").width()) +"px" );
    
    };
    
    $("#yourdiv").resizable(stop:onResized);
    

    In this example, i assume your divs are by default 300 pixels with, so the same amount that one div has been increased, is substracted from the other.

    If you dont want to allow vertical resizing, you can add a callback like this:

    $("#yourdiv").resizable({
        resize: function(event, ui) {
            ui.size.height = ui.originalSize.height;
        }
    });
    

    or you can set minHeight and maxHeight to the same value like this:

    $("#yourdiv").resizable({
        minHeight: 555, maxHeight:555
    });
    

    If you are not using Resizable, then I dont understand your question.

    Hope it helps 🙂

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

Sidebar

Related Questions

I have a page ( http://www.gardensandhomesdirect.co.uk/newhomepage ) I want to make the center column
I have a page where there is a column and a content div, somewhat
I have a page with 3 columns of links at the bottom. Each column
I have a page using <ul> lists for navigation (Javascript changes the styling to
i have these two queries, that i want to join together, but am not
I have two tables named tbl_collectiondesireddatetimelocations and tbl_locations Structure of tbl_collectiondesireddatetimelocations is : pk_collectiondesireddatetimelocationid
I have graphical project of three-column Drupal front page which has first column for
I have two table News and NewsComments. I followed the rules of naming structure
I have the following structure in an aspx page: <asp:Panel ID=pnlCust runat=server> <asp:GridView ID=gvMaster
I have a page that has 2 columns of words, 20 total, that are

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.