Hello there,
would anyone please have a look at my new website-in-progress http://brodzko.cicolina.org/newbrodzko/home ? I am having troubles with the drop-down menu. Don't get freaky, the inline CSS is used only because of the demonstration and I haven't worked on it too much yet.
What bothers me is this problem: (bordered red) The whole menu is coded via separate <dl>s. In the red bordered one there's also a relative positioned <ul> containing the submenu, which is hidden defaultly. Now when you hover the 'Services' link, the menu shows up exactly as it should - and you can see also the border changes, so the <dl> itself is 'bigger'.
I was supposing that using this, setting an 'onmouseout' event would be effective enough to hide the submenu exactly when necessary and thus make the whole thing behave accordingly. Apparently, I was wrong. JavaScript behaves as if the <dl>'s height was the same as before (or not even that, something BETWEEN his original height and the new one.
I think this: The problem is, that the submenu is relatively positioned outside the mainmenu nav, even outside the header (not semantically, but it displays that way). Thus, when you move your cursor out of the header's area, JS automatically supposes that you're also out of the <dl>'s area and hides the submenu.
However, I am not sure whether I'm right or not, and am far away from solving it. So please, any advices how to modify the HTML code or how to make the script work like this?
Thank you guys!
would anyone please have a look at my new website-in-progress http://brodzko.cicolina.org/newbrodzko/home ? I am having troubles with the drop-down menu. Don't get freaky, the inline CSS is used only because of the demonstration and I haven't worked on it too much yet.
What bothers me is this problem: (bordered red) The whole menu is coded via separate <dl>s. In the red bordered one there's also a relative positioned <ul> containing the submenu, which is hidden defaultly. Now when you hover the 'Services' link, the menu shows up exactly as it should - and you can see also the border changes, so the <dl> itself is 'bigger'.
I was supposing that using this, setting an 'onmouseout' event would be effective enough to hide the submenu exactly when necessary and thus make the whole thing behave accordingly. Apparently, I was wrong. JavaScript behaves as if the <dl>'s height was the same as before (or not even that, something BETWEEN his original height and the new one.
I think this: The problem is, that the submenu is relatively positioned outside the mainmenu nav, even outside the header (not semantically, but it displays that way). Thus, when you move your cursor out of the header's area, JS automatically supposes that you're also out of the <dl>'s area and hides the submenu.
However, I am not sure whether I'm right or not, and am far away from solving it. So please, any advices how to modify the HTML code or how to make the script work like this?
Thank you guys!