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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 15, 20262026-05-15T19:15:32+00:00 2026-05-15T19:15:32+00:00

I’m trying to make an optional draggable div, which shows up at some condition.

  • 0

I’m trying to make an optional draggable div, which shows up at some condition. This does work for me. The Initial location is fine, but the new div pushes the panel below further below. Now I want the draggable panel to be displayed on top of the rest of the panels (without reshuffling the existing panels).
The code is below, and I put an example with js libraries, and css on my website: link text (not sure what the stackoverflow policy is on this, as I’ll probably won’t leave it there forever).

<html>
<head>
<title>Desgin Mayor</title>
<style type="text/css">
#draggable { width: 120px; padding: 0.5em; border: 3px solid red; }
</style>
<script type="text/javascript">
 </script>




<link rel="stylesheet" href="css/designmayor.css" type="text/css" media="screen, projection"/>
<script type="text/javascript" src="js/jquery-1.4.2.js"></script>
<script type="text/javascript" src="js/jquery.ui.min.js"></script>
<script type="text/javascript">
$(function() {
        $("#draggable").draggable();
        $("#draggable").hide();
});
function test() {
    for (i=0;i<10;i++) {
          $('<div class="inputline">Line ' + i + '</div>').appendTo('#draggable');
    }
    $('#draggable').show();
}
</script>
</head>
<body>
<div id="header"><div class="headertext">Design Mayor</div><div id="draggable" class="ui-widget-content inputpanel">
 <p>Input Controls</p>

</div></div>

<div class="designmenu">
 <ul class="menu">
  <li><a href="javascript:test()">Press me</a></li>
 </ul>
</div>
<div id="contentscontainer">
<div id="designpanel">
</div>
</div>
</body>
</html>

The relevant css I’m currently using:

element.style  {
   display:block;
   position:relative;
}
#draggable {
   border:3px solid red;
   padding:0.5em;
   width:120px;
}
drag.html (line 5)
.ui-widget-content {
   background:url("images/ui-bg_flat_75_ffffff_40x100.png") repeat-x scroll 50% 50% #FFFFFF;
   border:1px solid #AAAAAA;
   color:#222222;
}
designmayor.css (line 62)
.inputpanel {
  border:1px solid #FF0000;
  display:inline;
  float:right;
  font-size:65%;
  left:10px;
  width:7%;
  z-index:5;
}

Any help is greatly appreciated

  • 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-15T19:15:33+00:00Added an answer on May 15, 2026 at 7:15 pm

    To get the overlay div to not disturb the elements around it use absolute positioning.

    Change your CSS to:

    #draggable {
        border:     3px solid red;
        padding:    0.5em;
        width:      120px;
        position:   absolute !important;
        left:       113px;
        top:        69px;
    }
    

    .
    Adjust left and top to taste. These 2 values will be ignored once dragging starts.

    Note that the absolute !important; is needed because the UI Draggable plugin automatically adds position:relative; and the docs don’t indicate an easier way to override it.

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

Sidebar

Related Questions

I am trying to understand how to use SyndicationItem to display feed which is
Basically, what I'm trying to create is a page of div tags, each has
Does anyone know how can I replace this 2 symbol below from the string
I'm parsing an RSS feed that has an &#8217; in it. SimpleXML turns this
I have some data like this: 1 2 3 4 5 9 2 6
I'm trying to decode HTML entries from here NYTimes.com and I cannot figure out
link Im having trouble converting the html entites into html characters, (&# 8217;) i
this is what i have right now Drawing an RSS feed into the php,
I have just tried to save a simple *.rtf file with some websites and
I am trying to loop through a bunch of documents I have to put

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.