Ah, easy fix.  I went ahead and mimicked your site.  All you need to do
to fix this is to set the parent element, #page in your case,
position:relative.  Now it works like a charm!

 

hth,

-scott

 

________________________________

From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On
Behalf Of Gord Busse
Sent: Thursday, March 08, 2007 9:52 AM
To: JQuery Discuss
Subject: [jQuery] Interface Draggables Problem

 

Greetings,

I am new to JQuery and am very excited to start using it and jump into
the world of javascript programming. I have been experimenting with the
Interface plugins and have come across a problem or possible bug with
the Draggable library. Please see the following page: 

http://www.gordbusse.com/test.htm

I have a parent div horizontally centered on the page using:

margin-right: auto;
margin-left: auto;

And have a child div inside that set to be draggable. But the draggable
div does not appear to be obeying the containment: 'parent' command and
staying within the div. In fact it seems that there is a constraint but
the constraint is left justified whereas the parent div is centered?
Furthermore the draggable child div also appears to be ignoring the
padding setting of the parent div as well? 

If I take out the auto margin settings to make the parent div left
justified it looks better but it still doesn't seem to be working right?

Am I doing something wrong or is this a bug?

Thanks in advance for any help anyone can give me. 

Gord

_______________________________________________
jQuery mailing list
discuss@jquery.com
http://jquery.com/discuss/

Reply via email to