Closed (won't fix)
Project:
Nice Menus
Version:
7.x-2.x-dev
Component:
Code
Priority:
Normal
Category:
Feature request
Assigned:
Unassigned
Reporter:
Created:
26 Nov 2007 at 08:40 UTC
Updated:
2 May 2011 at 06:10 UTC
Jump to comment: Most recent file
Comments
Comment #1
add1sun commentedYou need to select "down" as the Menu Style on the block configuration page.
Comment #2
enkara commentedBut I only get a vertical menu showing items down.
Comment #3
enkara commentedIt was my ccs's fault. Thank you
Comment #4
(not verified) commentedAutomatically closed -- issue fixed for two weeks with no activity.
Comment #5
techguy10 commentedCould someone post the css to make the menu that drops down from a down menu appear horizontal, thanks
Comment #6
add1sun commentedChanging title to be more accurate.
Comment #7
kasiawaka commentedI wanted to have the same feature - Nice Menus that displays every level of the menu in horizontal way. I called it down-down and posted the code here http://drupal.org/node/248365 I hope it helps
Comment #8
add1sun commentedThanks kasiawaka! Since that is changing the module to add a new option, I'll change this to a feature request.
Comment #9
add1sun commentedWhoops, also going to move to V2 since it is a new feature.
Comment #10
add1sun commentedI have rolled kasiawaka's handbook page into a patch against HEAD. Not tested.
Comment #11
add1sun commentedHere is a much updated patch that cleaned some stuff up and takes into account the Garland header junk. I played around with it some and I'm not a fan of this patch as-is. It does lay out children horizontally but they aligned left under the parent (the first child is directly under the parent and then siblings march out to the right). Almost any horizontal menu I've seen has the horizontal layers under the parents styled for the full width of the parent menu and often the children are always set either to the left of the whole menu (not its parent) or centered. See http://www.cssplay.co.uk/menus/dd_valid_2.html for examples.
I only want to add this to NM if it look and acts very like what people expect out of the box and has good docs on at least one or two ways to style it. So, here is a patch, but it definitely still needs work from CSS folks.
Comment #12
talatnat commented@add1sun: I tried out the patch because it was exactly what I needed to do (2 or 3 horizontal levels; primary, secondary and tertiary). For some reason I overlooked your comments that the children don't align left, and spent a lot of time trying to fix it in CSS, but it was to no avail. I used the Zen theme, the one I am most familar with.
So, "downdown" is very useful provided -- as you said -- it follows the expected behavior of being left-aligned.
---------
An additional feature would be a CSS-hybrid menu that always shows the secondary links of the "active" primary link, as in:
http://www.alistapart.com/d/hybrid/hybrid-4.html#
The actual article is at: http://www.alistapart.com/articles/hybrid/
So, my feature request would be a "left-aligned downdown" menu with persistent secondary links.
PS: Nice_Menus makes me smile, tks.
Comment #13
mariusooms commentedHi....I actually achieved this effect without even knowing about this patch by using css only. I think the trick is setting ul parent to position relative and child to position absolute.
Regards,
Marius
Comment #14
haggins commentedHi!
I got the horizontal childs working as described at http://drupal.org/node/248365
But what I need is not a fixed width but a width depending on the strings length. I think it should work with float: left but it doesn't. Need help!
Any suggestions?
Comment #15
haggins commentedIt works with this custom css:
Comment #16
cyoong87 commentedHas anyone achieved this on version 6?
haggins' CSS code doesn't work.
I want to modify the CSS instead of modifying the module files.
Comment #17
Karlheinz commentedHaving not seen this issue, I just posted a reply on the Nice Menus horizontal children page.
The CSS that was on that page wouldn't work, so I added my own in the reply.
AFAIK, the problem with the alignment can only be solved by setting each menu's position to fixed, and aligning it relative to the whole page (which is what A List Apart does). mariusooms's suggestion didn't work for me, and I've found no combination of
ul/lipositioning that will achieve the desired effect. (Haggins' CSS code didn't solve this issue either.)I still think this would be good to add to the module. You would have to make sure you mentioned the alignment problem in the documentation, of course - and probably in the CSS comments as well.
I would suggest "horizontal" or "parallel" for a style name, though - makes more sense than "downdown."
EDIT: I did think of a way left-alignment would work, but it's a major hack.
First, you would have to give an ID to each
<li>tag, that represents which number list item it is (e.g. "item-1", "item-2", "item-3", etc.)Then, for each ID, you would set the child list's
left:attribute to a multiple of the (parent) list item's width, depending on which list item it is.For example: Each list item is given a width of 100px. So, you would have classes like this:
Like I said, this is a hack - you would have to give each item number its own CSS rule, even if you have a hundred items. It would also require re-writing the output of every single
<li>tag in the menu hierarchy, thus would have to be handled by a patch tonice_menus.module.I have no idea if this is a good idea, just putting in my two cents.
Comment #18
Karlheinz commentedOkay, I thought I'd put this in a reply, rather than edit my post YET AGAIN. (Besides, that idea might be good for something down the road...?)
I found the culprit. In the
nice_menus.cssfile (the one you're not supposed to edit), there's this bit of CSS:This must be OVERRIDDEN for horizontal menus to work:
If you are copying/modifying the CSS from the "-down" class, you also need to override the "clear" attribute on the list items. So, change:
...to:
That's it! No extra markup or classes needed!
I'm going to post this info on the Nice Menus horizontal children page as well.
EDIT: Found one other issue... When the cursor moves out from the parent list item, the child list isn't "stickied."
In other words: if you have a parent menu item at the right side of the menu, you roll over it and its child menu appears, floated left as you would expect. But if the list isn't long, it won't overlap the parent list item, so you'll need to move the mouse off of the parent menu item, hiding the child menu before you can click on anything.
In order to fix this, you MUST set the child menu to a fixed width, as well as the parent:
Since just about everyone does this anyway right now, I'm not sure it's too much of an issue, but it should be noted.
Comment #19
add1sun commentedMoving this back to the correct version. Features only go into dev.
Comment #20
aiphesthe down-down feature is in the dev version now or not ? because i'm using it with patch, and i would to update the module...so if the dev version provide down-down...i will go to update
Comment #21
add1sun commentedComment #22
asb commented@aiphes (#20): The status "needs work" would suggest that the code isn't yet ready for review (which would be "needs review"). Alternatively you might want ro check out the 'superfish' module.
Comment #23
vordude commentedAgreed, not a bad Idea, I'd love to see it go into being an option in something like #219512: Have selectable prepackaged styles
Without code, and a good way to implement this, right now, I'm saying 'won't fix' not because I think it's bad, just being realistic with priorities.
If you have a patch, by all means, reopen this.