When using position absolute, you need to explicitly specify the position of
the parent if you want the values to be relative to the surrounding div. So,
for the first div in the document.body, make sure it explicitly has
"position: relative" (or whatever position), then try what you have.

Hope this helps,
~Philip


On Wed, Aug 3, 2011 at 12:22 AM, Steve Onnis <[email protected]> wrote:

> I have this...****
>
> ** **
>
> note.position({****
>
>       relativeTo : $(document.body).getFirst("div"),****
>
>       y : options.coordinates.top,****
>
>       x : options.coordinates.left****
>
>       });****
>
> ** **
>
> Y is working but X is not. It is still calculating off the edge of the
> browser.  The positions are retrieved using
> getCoordinates($(document.body).getFirst(“div”)) so using Element.position
> should be putting it back in the same spot yes?****
>
> ** **
>
> *From:* Philip Thompson [mailto:[email protected]]
> *Sent:* Wednesday, 3 August 2011 2:47 PM
> *To:* [email protected]
>
> *Subject:* Re: [Moo] setStyles relative to an object****
>
> ** **
>
> On Tue, Aug 2, 2011 at 11:23 PM, Steve Onnis <[email protected]>
> wrote:****
>
> Does anyone know how i would go about using setStyles to position an
> element relative to another element?****
>
> ** **
>
> http://mootools.net/docs/more/Element/Element.Position****
>
> ** **
>
> ~Philip****
>
>
> --
> http://lonestarlightandsound.com/****
>



-- 
http://lonestarlightandsound.com/

Reply via email to