/    Sign up×
Community /Pin to ProfileBookmark

Problem with CSS+JavaScript menu in IE6

On this site [url]http://leomaximusrealty.com/[/url] I use some CSS to create a horizontal drop down menu with 2 levels, using the standart procedure: <ul><li>top<ul><li>submenu</li></ul></li>…</ul> and in the CSS: li ul {display: none}, il:hover ul {display:block}. It works fine in all browsers except in IE6 of course. In order to get things done I decided to use JavaScript following this simple way: [url]http://www.alistapart.com/articles/dropdowns/[/url] (change the className of the “li” which must show to a class wich contains display: block). Now in IE6 when i go with the mouse over the link the first time nothing happens. I have to hover it again in order the menu to show. After that it works. I can’t understand why this happens after the function is called the first time (when I put alert(…) in it it pops up even the first time). With this script also I can’t get the second level work at all. Can you tell me why that happens or maybe another script to use. Thank you in advance ?

to post a comment
JavaScript

1 Comments(s)

Copy linkTweet thisAlerts:
@StyxauthorJul 01.2007 — I solved the problem in the meantime ? It's a better idea not to change the className, but directly style.display = 'block'.
×

Success!

Help @Styx spread the word by sharing this article on Twitter...

Tweet This
Sign in
Forgot password?
Sign in with TwitchSign in with GithubCreate Account
about: ({
version: 0.1.9 BETA 5.19,
whats_new: community page,
up_next: more Davinci•003 tasks,
coming_soon: events calendar,
social: @webDeveloperHQ
});

legal: ({
terms: of use,
privacy: policy
});
changelog: (
version: 0.1.9,
notes: added community page

version: 0.1.8,
notes: added Davinci•003

version: 0.1.7,
notes: upvote answers to bounties

version: 0.1.6,
notes: article editor refresh
)...
recent_tips: (
tipper: @AriseFacilitySolutions09,
tipped: article
amount: 1000 SATS,

tipper: @Yussuf4331,
tipped: article
amount: 1000 SATS,

tipper: @darkwebsites540,
tipped: article
amount: 10 SATS,
)...