How to get superfish sub menus top-aligned?

一笑奈何 提交于 2019-12-23 04:41:49

问题


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

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!