问题
On the example here each submenu will be aligned with the item you positioned the mouse over. However, because my menu contains very many items, I would like each submenu to be top-aligned with the column (ie. the parent ul) of the item, not the item itself. This way, all submenus will always start at the same vertical position right below the main (horizontal) menu.
How can I accomplish that?
回答1:
OMG that was easy. After spending hours trying out JS solutions, I just figured that at all I need to do is setting the li to position:static instead of relative. Except the first level, though, so the solution is:
#main_menu li.current li.current { position: static !important }
来源:https://stackoverflow.com/questions/12619380/how-to-get-superfish-sub-menus-top-aligned