Hi everyone,
I have been working on my personal implementation of a CSS menu to brush up my CSS. You can download the source from here. I must declare here that I modified and used the javascript code from some other implementation. I cant recall from where but I will find out and update this post.
I wanted the menu to be simple to implement and also standards compliant. I wanted the HTML to be no more than a simple nested UL, and so it is. So, I set off to make the menu.
It has always been a tough experience with IE, and yet again I found myself running for hacks to make IE work. My implementation requires a mouseover event on LI, so “li:hover” should work, RIGHT?…… WRONG. In IE “:hover” pseudo class is only applicable to anchor tags. So I had to include a conditional javascript block to attach event handlers to the mouseover and mouseout events of the LI element for IE.
For other browsers I have implemented similar behavior using CSS using the famous “html > body” hack.
The menu is working just fine, except for one thing. The borders of the parent menu are showing through the submenu, in spite of the “z-index” setting. Just look at the snapshots below.
IE
Firefox and other browsers
Still figuring out how to solve it. I would love to receive your feedback.
[Update] The IE bug is solved. Download the latest version from here. Thanx to Lalit.


August 3, 2007 at 7:25 pm |
Maybe you can show your code? Kind of hard to guess what’s going on by just looking at screenshots.
August 3, 2007 at 8:07 pm |
I have included a link for the source code in the 3rd line. Anyways, here is the link
http://rapidshare.com/files/46716617/menu.zip
Unfortunately I cannot properly include the code in the post.
August 6, 2007 at 12:41 pm |
Hellos…..
August 6, 2007 at 12:45 pm |
Hi Lalit, how r u?….. got any suggestions on this?….. I am stuck for like 3 days on this
August 6, 2007 at 1:29 pm |
Hello Sir. I have solved it. I tried to paste it here but i think that didn’t get. I will send you across sometime. You can refer it here in this link: —–
http://www.dynamicdrive.com/forums/showthread.php?t=19925&page=2&highlight=SuckerTree
That would solve the problem you are having.
August 6, 2007 at 1:47 pm |
Thanx Lalit, I have updated the code in the post. I will be working on enhancing it now.