"Yann-Erwan Perio" <y-*******@em-lyon.com> schrieb im Newsbeitrag
news:40***********************@news.free.fr...
Gernot Frisch wrote:
when I have this code in my script:
pos_y = document.getElementById('holdmenu').offsetTop;
The menu get's positioned at the very top of the site - really
annoying. On FireFox it works good. If I put this script part at
the very end of the body, it works, too.
"offsetTop" is calculated in regards of the offsetParent, a
container element. Your problem may be related to your setting styles for one
of this container element after reading the offsetTop value (check any
absolute-positioned elements). In that case, browsers'
implementation could take the change into account quite differently.
Could you post some lines demonstrating the issue?
I use a slightly changed version of this:
http://www.bmchebbi.addr.com/advancedmenunotes.htm
Can you help? Also, Can you tell me hot to "move" the menu (e.g. after
a window.onresize)? I think I have to modify the DIVs positions, but I
don't know how to loop through all of them. That's a bit my problem.
I'm a C++ coder and JavaScript is so... well... "ambigious". Things
like:
var couldbeanyting [];
anyvar['Somewhere']...
and then 'Anystring'.SomeOtherFunction and 'this.' is really strange
to me...
-Gernot