View Full Version : Drop down menu

06-19-2010, 07:12 PM
Hi Everyone,
I'm trying to put a drop-down menu onto my website, but desperately need some help; I'd be so grateful if someone could offer some assistance.

If you click on this link to see the webpage, http://www.ambersupplies.co.uk/newsite/pageone.htm you'll see the drop down menu, and the two problems I'm having with it. Please don't take any notice of the menu content; I'll be styling it all when these problems are sorted.

Firstly, you'll see that the external drop down list is lying within the table (with the red background) when it should appear outside. I've obviously missed a closing table or td tag somewhere, but can't find it.
Secondly, the drop down menu should appear on mouseover, and disappear on mouseout; which it does, but as you can see, when the page is firstly or reloaded, the menu is showing.

I didn't write this drop-down menu code, I copied it from this page with the intention of styling it to my own webpage:
http://www.w3schools.com/DHTML/tryit_view.asp?filename=trydhtml_menu10, perhaps this will give someone a clue.

Can anyone shed a bit of light on this for me, please? I'd be really grateful for any help whatsoever.
Many thanks in advance.

06-20-2010, 03:48 PM
I'd like to share an important article, if you are serious about web development. Here it's http://www.hotdesign.com/seybold/. Also, take a look at a good tutorial on making CSS based 2 column layout at http://bonrouge.com/2c-hf-fluid.php

And here's an article on making a CSS based(which is far superiour over the javascript based) drop down menu at http://www.htmldog.com/articles/suckerfish/dropdowns/

06-20-2010, 06:13 PM
Thanks very much for your reply, it was a great help; just what I wanted.
I've put it into the page now, and uploaded an example. The links haven't been activated yet, it's just so that anyone who might be interested can see how the effective this simple drop-down menu code is. Here's the link:

Thanks again.

07-02-2010, 09:39 PM
question regarding the example at suckerfish - does anyone know how to convert the hover behavior to an on click event - where the menu doesn't drop down until the user clicks on the menu option??

Old Pedant
07-03-2010, 12:16 AM
You can't do it with CSS alone. You have to stop using the CSS hover effect and change to JavaScript.

So if that's really what you want, stop looking at that code and find one that is, indeed, all done in JavaScript.