Fly Out Menu (v. 2.84 - 2.9)
Note: A new fly out menu include (%CATEGORY_FLYOUT%) is included in the 2.91 and 2.92 versions. Only use the modification below for versions 2.84 through 2.9.
To create a fly out menu (a vertical menu in which subcategories fly out as they are moused over) in version 2.84 or 2.9 beta:
-
In your template, use the style include:
%CATEGORY_LIST%
which references the file:
navbar_lists.php -
In your template's styles or external style sheet, add:
/* MAIN MENU */
.sbnavlist ul, .sbnavlist ul li {
margin: 0;
padding: 0;
list-style: none;
width: 200px;
cursor: pointer;
}
.sbnavlist ul li:hover {
position: relative;
}
.sbnavlist ul li a, .sbnavlist ul li ul li a {
display: inline-block;
zoom: 1;
*display: inline;
padding: 5px;
}
/* OTHER LEVELS */
.sbnavlist ul li ul, .sbnavlist ul li:hover ul li ul {
position: absolute;
display: none;
}
.sbnavlist ul li:hover ul, .sbnavlist ul li:hover ul>li:hover>ul {
display: block;
left: 199px;
top: 0;
}
/* COLORS */
/* general background color */
.sbnavlist ul li, .sbnavlist ul li ul li, .sbnavlist ul li:hover ul li:hover ul li {
background-color: tomato;
}
/*general text color */
.sbnavlist ul li a, .sbnavlist ul li ul li a, .sbnavlist ul li:hover ul li:hover ul li a {
color: white;
text-decoration: none;
}
/* border between backgrounds */
.sbnavlist ul li:not(:first-child) {
border-top: solid 1px white;
}
/* hover background - optional */
.sbnavlist ul li:hover, .sbnavlist ul li ul li:hover, .sbnavlist ul li:hover ul li:hover ul li:hover {
background-color: pink;
}
/* hover text color - optional */
.sbnavlist ul li:hover>a, .sbnavlist ul li ul li:hover>a, .sbnavlist ul li:hover ul li:hover ul li:hover>a {
color: red;
text-decoration: none;
}Changing the following as needed:
-
width: 200px; The width of each navigation block.
-
left: 199px; The starting point of the subcategory fly out (should be less than the navigation block width).
-
background-color: tomato; The background color of the blocks.
-
color: white; The text color of the blocks.
-
border-top: solid 1px white; The color of the border between blocks.
-
background-color: pink; The background color of the blocks when you hover over thenm.
-
color: red; The text color of the blocks when you hover over them.
-
-
Save the template or style sheet.