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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 27, 20262026-05-27T15:25:43+00:00 2026-05-27T15:25:43+00:00

I just posted a question but I think I should reword it into something

  • 0

I just posted a question but I think I should reword it into something more general. Basically, I have an element that you can move around and resize using jQuery. Using CSS, I attached another div to this, to the right of it. When you first load the page, it’s right where it’s supposed to be. However, when I start to drag or resize the draggable div, the one that’s originally attached to it stays where it is.

Is there any way to bind this div to the other one, so that it moves with it? Preferrably, without putting it in a container, as that complicates more things considering the nature of my site.

  • 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-27T15:25:44+00:00Added an answer on May 27, 2026 at 3:25 pm

    There’s no way to do this without using a container, but you don’t need both elements in a container; you just need the “follower” to be a child of the draggable div.

    Make sure the “follower” div is a child of the draggable div in your markup:

    <div class="draggable">
        <p>I'm draggable...</p>
        <div class="follower">I follow</div>
    </div>
    

    In your CSS, set position on the outer div, but don’t specify any offsets:

    .draggable { position: relative; }
    

    Then, position the inner div, and give it offsets from the parent. You can position the inner as absolute or relative — in both cases, it will position itself relative to the nearest container that has position, in this case the parent draggable:

    .follower { 
        position: absolute; 
        top: 0;
        right: 20px;
        etc...
    }
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

So I just have posted a question about this code (which was answered): $(document).ready(Main);
[I just posted a similar question, but I'm not sure whether is actually got
Similar to the question I posted yesterday , I have this problem that I
I just posted this question jQuery - passing arrays in post request , where
I just posted a question about whether WPF is a good choice for a
I just posted this question and learned about <see cref=> , however when i
I've just posted a question on stackoverflow about a hide/show issue I was having
This question is related to another question I just posted . I'm prepping for
This is less an HTML, CANVAS question and more of a general math question.
I just posted this as part of a reply to a question about the

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.