How to get superfish sub menus top-aligned?

2019-06-11 04:52发布

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条回答
走好不送
2楼-- · 2019-06-11 05:16

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 }

查看更多
登录 后发表回答