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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 27, 20262026-05-27T21:52:49+00:00 2026-05-27T21:52:49+00:00

I have this code : HTML <div class="draggable_main_container"> <div class="draggable_container"> <div class="draggable"> <div class="minus">

  • 0

I have this code :

HTML

<div class="draggable_main_container">
    <div class="draggable_container">
        <div class="draggable">
            <div class="minus">
                label
            </div>
        </div>
    </div>
</div>

CSS

.draggable_main_container
{
    width:134px;
    overflow:auto;
    position:relative;
    height:350px;
}

.draggable_container
{
    height:300px;
    position:relative;
    overflow:visible; 
    background-color:blue;  
}

.draggable
{           
    background-color:red;
    height:134px;
    width:134px;
    cursor:pointer;
    position:relative;
}

.draggable .minus
{
    position:absolute;
    left:50px;
    bottom:-20px;    
    width:32px;
    height:20px;  
    background-color:yellow;  
}

jQuery

$(".draggable").draggable({
    axis: "y",
    containment: 'parent'
});

now, on Firefox there is no problems! On Chrome/Safari, it blocks when it get the bottom of the container.

Then, if I click and I scroll again to the bottom, the div move over the container. When it gets the main container height (350px) it also create the "scrolls" bars.

Well, to avoid the scroll bars is easy, just add overflow:visible; to draggable_main_container.

But what I need is really to block the draggable element when it get the parent bottom. How can I do it?

I think the problem is the position:absolute item attacched to the draggable item (the .minus one; in fact if I remove it, all works…)

  • 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-27T21:52:49+00:00Added an answer on May 27, 2026 at 9:52 pm

    so I played around with your code a little and figured something out. And yes, its a fix.

    So you are constraining your draggable by the draggable’s parent .draggable_container.
    Now, in draggable, you have this minus thing that extends a bit from the bottom, which is fine until it sticks “outside” of .draggable_container”. Except that it isn’t sticking outside of it. The minus element is extending .draggable_container. Now when you click and then move draggable again, its parent element is temporarily bigger and thus it can scroll down further. Each time you drag it down a little more you’re extending .draggable_container.

    Now I don’t know why this is only an issue when you click but that’s what’s happening.

    The fix is to add 20px of padding to the bottom of .draggable_container. This stops the .minus element from extending .draggable_container.

    You don’t have the little effect of the “label” going outside the blue box but you can find another way to simulate this.

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

Sidebar

Related Questions

I have this code : HTML <div class="draggable_container"> <div id="draggable_1" class="draggable">&nbsp;</div> </div> CSS .draggable_container
I have this code : HTML <div class="box_video"> <object width="330" height="290" type="application/x-shockwave-flash" data="http://www.youtube.com/v/KEkR1ox_K10?version=3&amp;f=user_uploads&amp;app=youtube_gdata&amp;rel=1&amp;border=0&amp;fs=1&amp;autoplay=0" style="visibility:
Hi I have this HTML code <th scope=col class= style=width: 13px;> <div class=some-handle></div> <a
I have this code : HTML <div class="temperatura"> <a href="/link/" class="temperatura_localita"> <div style="padding-left:12px;"> Text1
I have this code : HTML (meaning 4.0) <div class="temperatura"> <a href="/link/" class="temperatura_localita"> <span
I have this HTML code: <div class='com_box'> <div class='com_box_c'> <div class='com_box_info'> <a id='quote'>quote</a> </div>
Say I have jquery code like this: html += '<div class=index>' + item.index +
I have this code <html> <head> <style type=text/css> .frame {width: 50em; border: 1px solid
I have this html code: <body> <div class=CodeRay> <div class=code><pre><span class=no> 1</span> require <span
i have this code $(function() { $('#ans_vote a span').click(function(){alert('working');return false;});}); and this html <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.