Menu is set inside a layer, and this is what I need for the site.
I cannot understand why the submenus appear very far from the place where I axpect them.
Because the menu doesn't like being in a div, it's made up of divs. Why not set the position using top=113; left=228; and remove the position="relative".
Ruth wrote:[...] Why not set the position using top=113; left=228; and remove the position="relative".
Ruth
Ok: it is working this way. But of course having all pages in the site made up of a stable part, plus a layer changing every time, the layer solution was more confortable.
I will evaluate, but if sombody has a new solution please post it!
I'm sorry, someone else would have to help you with that. If you want to somehow attach the menu to the div maybe some javascript function could do that, but I see the div and it has a top and left position and is positioned absolutely so [unless absolute doesn't mean what it means in the outside world???] it would seem that if you set the menu to that position it will always appear at that point.
The odd positioning will not happen in all browsers... it depends on how the browser calculates the positions of various containers. As Ruth mentioned, putting the menus inside of a div will have different effects in different browsers and is generally not recommended. If you want to do that... and I'm not sure if this'll work... you could try splitting the main menu code (your "Giochi in Versi" menu) away from the rest and load only that into the div. In otyher words, remove the "Giochi in Versi" menu code from the versi_data.js file and put it in another file... say, "versi_main.js". Load only versi_main.js into the div, and load the versi_data.js file in the head, after the ns4 conditional. Might be worth a shot.
What I want is to make the absolute values of 224 and 304 both equal to "relative 10". That is, I want each submenu placed 10 pixels down from the top of the main menu image.
If I understand what you're wanting to do (have the sub-menus basically at the top of the page when the main menu is 1/3 of the way down the page) - I disagree with the concept. Please tell me if I got it wrong!
If that is what you want, just take the height of the graphic (80) + the 10 you want and make that your top (top=90;). This isn't really relative positioning.
You'll really have to crank up the _menuCloseDelay value so folks can get to the subs before they close.
_subOffsetTop=10 // Sub menu top offset
_subOffsetLeft=-10 // Sub menu left offset
...control the position of the sub-menus "relative" to the main menu items. Fiddle with these values and see if you get what you want. They can be + or -, as you see.