The code:
To create a horizontal nav-bar with a horizontal second tier and optional vertical third tier, simply include the superfish-navbar.css file after the main superfish.css file and add the class sf-navbar
to the parent ul along with the usual sf-menu
class (space-separated, eg. class="sf-menu sf-navbar"
), and initialise as normal.
A nice option to add to this types of menu is restoring the relevant submenu when the user is not exploring other submenus. This can be done by telling Superfish the name of the class you are adding to the relevant <li>
elements to indicate the path to the current page. I often have the server add the class name 'current' for this purpose, so I would initialise this menu thusly: