Skip to content

Instantly share code, notes, and snippets.

@joeldbirch
Last active December 16, 2015 03:39
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save joeldbirch/5371767 to your computer and use it in GitHub Desktop.
Save joeldbirch/5371767 to your computer and use it in GitHub Desktop.
This is just superfish-vertical.css with a few lines added so the "supersubs-like" effect also applies to the top level menu. Comments in uppercase explain the additions.
/* adding sf-vertical class in addition to sf-menu creates a vertical menu */
/* eg. <ul class="sf-menu sf-vertical"> ... */
.sf-vertical {
min-width: 10em; /* <--- MAKE THIS MIN-WIDTH */
*width: 10em; /* <--- ADD FALLBACK WIDTH FOR IE7 */
}
.sf-vertical ul {
left: 100%;
top: 0;
}
.sf-vertical li {
width: 100%;
float: none; /* <--- ADD THIS TO LIMIT MENU WIDTH TO WIDEST ITEM */
}
/*** alter arrow directions ***/
.sf-vertical .sf-sub-indicator {
background-position: 0 0;
}
.sf-vertical li:hover > a .sf-sub-indicator,
.sf-vertical li.sfHover > a .sf-sub-indicator {
background-position: -10px 0; /* arrow hovers for modern browsers*/
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment