Unfortunately asp means nothing to me and you need to post the css and html that the browser sees. Run the page in your browser and then just copy the html from "view source" and then we can tell you what styles you need to apply to make it work.

You should follow the suckerfish tutorial to see how these menus are actually designed though to get a good idea of what needs to be done.

Basically you have a nested list inside a parent and when you hover the parent you reveal the submenu. e.g.

Because the nested list is contained within the parent it will stay open as long as the parent or the child is hovered.

It's basically as simple as that but you must ensure that parent and child are in contact with each because if there is a gap between them then you lose the hover effect and the menu disappears.

Hope that helps:)

ginobili
—
2010-08-28T13:25:34Z —
#3

Paul_O_B said:

Hi, Welcome to Sitepoint

Unfortunately asp means nothing to me and you need to post the css and html that the browser sees. Run the page in your browser and then just copy the html from "view source" and then we can tell you what styles you need to apply to make it work.

You should follow the suckerfish tutorial to see how these menus are actually designed though to get a good idea of what needs to be done.

Basically you have a nested list inside a parent and when you hover the parent you reveal the submenu. e.g.

Endless nested tables for nothing, tons of unneccessary div's and classes... much less javascript doing CSS' job... Pitch it and start over.

Problems are further compounded by all the meaningless ct100_ classnames that don't tell us what's going on, and the endless inlined presentational styling isn't helping one bit either.

I'd have to see what it is you are trying to do in a live copy and/or picture since I can't even make sense of that mess; and it's obviously not rendering what you want... though I am 100% certain EVERY one of your tables goes in the trash -- as you've got 10k of markup for 132 bytes of content and four IMG... a sure sign something is truly amiss. (my normal ballpark figure for such a page would be less than 4k). At least 50% (and more like 70%) of what you have for markup should be pitched. It's non-semantic, it's ten times more complicated than it needs to be, etc, etc, etc.

Stevie_D
—
2010-08-28T19:19:04Z —
#5

Holy :x

If any "professional" editing software has produced that code, the author needs to be summarily shot.

There is no practical way to debug or even understand such a horrendous mess of code - DeathShadow is right, if you aren't happy with what your editor has produced, your only sensible strategy is to ditch the editor, find a new one that does a proper job, and start from scratch.

ginobili
—
2010-08-28T21:03:33Z —
#6

Stevie_D said:

Holy :x

If any "professional" editing software has produced that code, the author needs to be summarily shot.

There is no practical way to debug or even understand such a horrendous mess of code - DeathShadow is right, if you aren't happy with what your editor has produced, your only sensible strategy is to ditch the editor, find a new one that does a proper job, and start from scratch.

Does anyone want to guess what the "professional" IDE is ?? ................................. Microsoft Visual Studio 2008!

Ok.. I'm going to ditch asp.net menu control and build my own menu using nested lists....

ginobili
—
2010-08-28T21:11:39Z —
#7

Actually.. I have another question for you guys... Since I'm a novice web developer, I'd like to know if all you guys hardcode the menu's like shown in this example :http://www.htmldog.com/articles/suckerfish/dropdowns/

Or do you guys build it from a sitemap (like I posted first) ? This was the main reason why I went for using asp.net menu control. I wasn't happy about it, but I did it cause it was easier. Now I'd like to know, if there is a good replacement for it..

Stevie_D
—
2010-08-29T09:22:25Z —
#8

ginobili said:

Actually.. I have another question for you guys... Since I'm a novice web developer, I'd like to know if all you guys hardcode the menu's like shown in this example :http://www.htmldog.com/articles/suckerfish/dropdowns/

Or do you guys build it from a sitemap (like I posted first) ? This was the main reason why I went for using asp.net menu control. I wasn't happy about it, but I did it cause it was easier. Now I'd like to know, if there is a good replacement for it..

I normally use a "server-side include" to get the menu on each page. This means that I just create a single file, which is then included on every page, and if I want to change anything, I only have one file to change.

PaulOB
—
2010-08-29T09:44:02Z —
#9

As an aside the first link you posted is actually using the suckerfish menu that I linked to.:)

The table code you have shown above is virtually impossible to debug and as others have stated is not worth the effort of fixing as you can build the basic dropdown in a few minutes anyway (once you know what you are doing).

ginobili
—
2010-08-30T14:03:23Z —
#10

How do you dynamically update the links to the pages, if the pages are on different folders ? I'm using the suckerfish menu now.

ginobili
—
2010-08-30T14:12:21Z —
#11

Nevermind.. stupid question.. figured it out..

system
—
2010-09-01T02:48:14Z —
#12

ginobili said:

Actually.. I have another question for you guys... Since I'm a novice web developer, I'd like to know if all you guys hardcode the menu's like shown in this example :http://www.htmldog.com/articles/suckerfish/dropdowns/

I build mine in a similar manner, but instead of the suckerfish script I use PeterNed's "Whatever:hover" for the IE6- support.

I do this because I often need hover effects on more than just the menu, and that script takes most of the headaches out of it. Just design for modern, and then throw csshover3.htc at it. (and before anyone *****es about the 'problems' with HTC's, the ONLY problem is mime-type at which point fix your **** server instead of blaming .htc's)

Though as per others, I include the markup for it (and all the other static elements that are the same on every page) using a SSI... These days that means PHP.

ginobili said:

Or do you guys build it from a sitemap (like I posted first) ? This was the main reason why I went for using asp.net menu control. I wasn't happy about it, but I did it cause it was easier. Now I'd like to know, if there is a good replacement for it..

If you're putting your entire sitemap into the menu, your navigation likely ends up such a convoluted mess it's unusable. That's the problem with dropdown menus and why increasingly I'm avoiding using them in the first place and just going for classic drill-down. As a rule of thumb I now NEVER do third-level cascades given what a pain in the ass they are to navigate.