Log in

View Full Version : second level ul display inline?



TheJoshMan
09-21-2008, 05:38 PM
OK, I've done this countless times, but I'm apparently having a brain fart.

Can anyone refresh my memory on how to display a second level ul horizontally rather than vertically? (used as submenu on :hover)

Here's what I've been trying...


#cmd ul li ul {
left:-999em;
}
#cmd ul li:hover ul {
display:inline;
left:auto;
}

Medyman
09-22-2008, 12:04 AM
You want the list items <li> to display inline, not the entire unordered list. Try:


#cmd ul li:hover li {
display:inline;
}

TheJoshMan
09-22-2008, 12:06 AM
no dice. Tried that one too. I'm thinking maybe something in my code is overriding it, I just can't find it yet. LOL

boogyman
09-22-2008, 12:43 PM
Josh does the submenu have its own class or id?

and do you reference that selector specifically anywhere in the css?

What medyman said is typically how to achieve the affect.

TheJoshMan
09-22-2008, 05:12 PM
no, it doesn't have it's own class or id, but there are 5 submenu levels supported via nested styling... so i'm fairly sure that i have something that's overriding it somewhere... I just haven't found it yet.

boogyman
09-22-2008, 05:45 PM
WOW 5 levels is a lot... typically I recommend 3 levels total maximum

if you have 5 sub-levels I don't know if it would be best used in a dropdown :|

TheJoshMan
09-22-2008, 08:23 PM
well, i can't *legally* give out all the particulars... but i've been "snatched up" so to speak. I'm writing the css menu code for a software development company which they will then put into their software.

I normally don't go above 2 sublevels, but the head honcho said he wants to support up to 5 levels... So five levels it is! LOL

boogyman
09-22-2008, 08:41 PM
I understand your dilemma and I have been there in the past, however as the professional, you should be telling the client the pro's and con's of such a large dropdown.

and yes I know you do this development stuff on the side, but as the developer you are the professional and he is the client.

If he still insists on his way, then create it with their idea, but make your own life easy by thinking about your way too, so when you show the client the product and they truly see what a disaster it was, you dont have to spend another huge amount of time correcting what you said was not a good idea in the first place... of course you shouldn't actually tell the client this... just explain to them and get a signature for additional resources and time you will need to re-develop the modal the way you know works. :)

Anyway, good luck

TheJoshMan
09-22-2008, 10:00 PM
yea, I think I'm going to have to. Dropdowns are fairly simple in css, AS LONG AS they're vertical!

I haven't had ANY issues yet with displaying 5 sublevels vertically... it's trying to make 5 horizontal sublevels that is really giving me headaches. LOL