tags:

views:

186

answers:

4

Removed link, problem solved

The menu at the top is supposed to be a dropdown menu, but it expands to the right instead.

My CSS is this (I believe this is the relevant bit anyway)

#primary-nav, #primary-nav ul { list-style: none; margin: 0px; padding: 0px; }
#primary-nav ul { position: absolute; top: auto; display: none; }
#primary-nav ul ul { left: 100%; top: 0px; }
#primary-nav li { float: left; }
#primary-nav li li { float: none; position: relative; }

#primary-nav ul, #primary-nav li:hover ul, #primary-nav li:hover ul ul, 
#primary-nav li.menuparenth ul, #primary-nav li.menuparenth ul ul { display: none; }

#primary-nav li:hover ul, #primary-nav ul li:hover ul, #primary-nav ul ul li:hover ul, 
#primary-nav li.menuparenth ul, #primary-nav ul li.menuparenth ul, 
#primary-nav ul ul li.menuparenth ul { display: block; }

I have no clue where exactly the direction for the menu is set.

+2  A: 

Remove the position: absolute; from the CSS of #primary-nav ul also maybe have a look at using FireBug, it's prilliant at experimenting with these things. Also what browser are you looking in? FF displayed the menu vertically but just wasn't aligned properly and didn't have the background.

stuartloxton
Agreed. I never actually knew you could use firebug for editing CSS it's quite good. I have in the past used the CSS editor that is in the web developer tool bar plugin that's good and would do a similar job.
Mark Davidson
I'm using FF2 and IE7, and they both show me a horizontal menu... After I removed the position: absolute it does drop down, but the different items are listed horizontically. In IE7 I get the misaligned version ou saw I think, with the position: absolute removed. And what does FireBug do? :$
Skunk
@Kiki, I'm in FF3.1 and Firebug allows you to change CSS values as you look at the page so you can quickly try out different things.
stuartloxton
A: 

It is kindof dropping down now, but in Firefox 2 it flashes and is barely unclickable due to that. And in IE7 it's poorly aligned and totally unclickable...

Skunk
+2  A: 

Take a small and nice reading here.

Ionut Staicu
I gave you the +1 for linking a great article, but more of an intro would have been nice.
Rob Allen
It's working, thanks for the link. I rewrote the entire (bit of) CSS, but it's working flawlessly now. Thanks.
Skunk
+1  A: 

I am seeing this menu as a vertical drop-down, not a horizontal one. Please specify what browser you're viewing in when asking CSS questions, as it makes a big difference in how to answer your question. Let us know if it is fixed, and what fixed it for future readers.

One thing I noticed is that your menu items poke out of your vertical list at the right. Try applying the padding to only the <li> element, not the anchor tag. This should fix your problem. When you apply it to both, you have to keep in mind that first you're putting the padding on the <li>, then adding more padding to the inner element so that it expands outside of it's container which only has the first amount of padding applied.

Angelina
I have it working now, using the link Staicu provided. I think you saw the working version. Thanks for the help with the "poking", I wasn't sure what made that appear. :)
Skunk