The exaple is clearly the structure is the wroted in the main comment
and
i use the structure child inside parent for this reason, to identify
the parent
and the childs.

you can use the firebug tool or the dom inspector in firefox, but it
is easy
the structure is the same that i wrote in the main comment, this
structure
are writed dinamically with createDOM function.

the line after the alert("a") is the line that generates de red-
margined divs
if you cannot understand another thing, only ask it, and i answer.

i leave here a detailed description of the structure.

<div>  <!-- this is the main div -->
  <ul> <!-- this is the "list" of the items of the menu -->
      <li style="float: left"> <!-- this is the menu entry for de
first level menu (parent) -->
         <!--  the float option is to use a horizontal menu  -->
         <!-- the red-margined cloned div have the position and
          dimensions of the avobe li element -->
          menu 1 <!-- this is the caption parent -->
          <div style="position:absolute"> <!-- this is the child div
of menu 1 -->
               <ul> <!-- this is the "list" of subitems of the child
menu (vertical)  -->
                   <li> menu 1-1</li> <!-- this is the menu entry of
the child menu -->
               </ul>
          </div>
     </li>
  </ul>
</div>

maybe can be helpful.

greetings

Felipe.

On 2 dic, 16:46, "Per Cederberg" <[EMAIL PROTECTED]> wrote:
> Yes, the provided example would be easier to understand if the parent
> menu and submenus were split up into separate divs:
>
> <div>...parent...</div>
> <div style="display: none">...sub 1</div>
> ... etc...
>
> Check the example page with the Dom Inspector in FireFox to help
> clarify what doesn't work. It seems to me that the <li style="float:
> left">... is not such a good idea.
>
> /Per
>
> On Dec 2, 2007 7:01 PM, Beau Hartshorne <[EMAIL PROTECTED]> wrote:
>
>
>
> > Felipe,
>
> > getElementPosition works for most simple cases. In general, the more
> > complicated the CSS is, the less reliable it is. We'd need to see a
> > very simple test to see what the problem is, and even then, I'm not
> > sure if we could work around it.
>
> > Beau
>
> > On 1-Dec-07, at 7:11 PM, Felipe Alcacibar B wrote:
>
> > > I'm creating a dinamic menu Object with MochiKit all works fine, but
> > > in getElementPostition i got some troubles with the position that it
> > > gives to me.
>
> > > i'm using the follow html structure to cerate the menu.
>
> > > <ul>
> > >  <li style="float: left"> <!-- to use a horizontal menu  -->
> > >        menu 1
> > >        <div style="position:absolute">
> > >             <ul>
> > >                 <li> menu 1-1</li>
> > >        </div>
> > >   </li>
> > > </ul>
>
> > > But getElementPosition gives me a position like the childs divs is not
> > > hided, and like a vertical list (without the float: left option).
>
> > > it is a bug or a bad use of the function?
>
> > > i got some example  inhttp://devel.tryer.cl/fullplanet/ab/
> > > menutest.php
> > > i explain it.
>
> > > the a alerts, it is to stop a compiler to see how is the position of
> > > the li curernt element.
> > > the red divs, are appedned to the body with de x and y coordinates
> > > gived from geElementPosition.
>
> > > acknowledged greetings.
>
> > > Felipe Alcacibar.
> > > Development of systems and solutions.
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"MochiKit" group.
To post to this group, send email to mochikit@googlegroups.com
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/mochikit?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to