Jump to content

Recommended Posts

Hi,

 

I'm currently trying to build a script that will allow two divs to sit next to each other and move when resized.

 

The code I have so far is here:

http://jsfiddle.net/7BSrL/6/

 

I would like it the second div to move to the right when the first div is resized and if the div gets too large for the container, the second div should move below the first div.

 

Could anyone teach me how to do this please?

Link to comment
https://forums.phpfreaks.com/topic/285296-jquery-resizeable/
Share on other sites

You're putting too much constraints on the style properties. Try this:

 

#resizable {
    width:75px;
    height: 75px;
    padding: 0em;
    position:relative;
    float:left;
    border: 1px solid #ccc;
}
 #resizable2 {
    width:75px;
    height: 75px;
    padding: 0em;
    position:relative;
    float:left;
    border: 1px solid #ccc;
}
.ui-resizable-helper {
    border: 2px dotted #00F;
}
#containment-wrapper {
    width: 95%;
    height:150px;
    white-space:nowrap;
    border:2px solid #ccc;
    overflow:hidden;
}
Link to comment
https://forums.phpfreaks.com/topic/285296-jquery-resizeable/#findComment-1464887
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.