This HowTo is intended to help you style the page menu bar with color gradients. Two examples are included for a light theme and dark theme. You don't have to follow my examples exactly, they're guidelines from which you can work.
Universal steps
Style & edit HEADER AREA
Make sure you have the page menu bar enabled; Configure Header Area should include %pages
MENU 1 (Page Menu) (Assuming everything on the page is at its default setting)
- Font Size & Face: 13px "MS Trebuchet", Arial, Verdana, sans-serif (Personal preference, adjust as desired)
- Transform text in Page Menu Bar?: none (Personal preference, adjust as desired)
Example 1: Light theme
MENU 1 (Page Menu)
- Background color, Background color: Hover, Background color: Parent: Set these at appropriate colors to match your theme for old browsers which don't support gradients. They're fallbacks. (Example 1 uses F9F9F9, 000000, F9F9F9, respectively)
- Border around all menu items: solid 0px transparent
- Link Color: Choose a dark link color (Example 1 uses 000000)
- Link Color: Hover: Choose a light hover color (Example 1 uses FFFFFF)
- White or Black Arrows as Sub Menu Indicator?: black
Add HTML/CSS Inserts - Adjustable styles are marked by comments
Code:
/* The main horizontal bar's background */ #menu1 ul.rMenu-hor, #menu1 ul.rMenu-ver { padding-left: 0px !important; /* Set this to Background Color in MENU 1 (Page Menu) - it is a fallback for older browsers */ background-color: #F9F9F9; /* Vertical gradients, change colors according to (top,bottom) */ background: -ms-linear-gradient(#F9F9F9, #E5E5E5) !important; background: -moz-linear-gradient(#F9F9F9, #E5E5E5) !important; background: -webkit-linear-gradient(#F9F9F9, #E5E5E5) !important; background: linear-gradient(#F9F9F9, #E5E5E5) !important; filter: progid:DXImageTransform.Microsoft.gradient(startColorStr='#F9F9F9', EndColorStr='#E5E5E5') !important; /* IE7,8,9 */ } #menu1 ul.rMenu-ver { margin-top: 0 !important; } #menu1 .rMenu-hor a { font-weight: bold !important; /* Personal preference */ line-height: 2.0em !important; /* This adjusts the height of the menu bar */ } #menu1 .rMenu-ver a { line-height: 1.2em !important; /* This adjusts the height of items in the submenus */ } #menu1 li { margin: 0 !important; background-color: transparent !important; } /* Hovered items and current page items get these backgrounds */ #menu1 a:hover, #menu1 a:active, #menu1 .current_page_item a:link, #menu1 .current_page_item a:visited { /* Vertical gradients, change colors according to (top,bottom) */ background: -ms-linear-gradient(#444444, #111111) !important; background: -moz-linear-gradient(#444444, #111111) !important; background: -webkit-linear-gradient(#444444, #111111) !important; background: linear-gradient(#444444, #111111) !important; filter: progid:DXImageTransform.Microsoft.gradient(startColorStr='#444444', EndColorStr='#111111') !important; } /* Sub-menu items which should not be highlighted */ #menu1 .current_page_item ul a:link, #menu1 .current_page_item ul a:visited { background: transparent !important; filter: progid:DXImageTransform.Microsoft.gradient(enabled=false) !important; /* Set this to the same color as Link Color in MENU 1 (Page Menu) */ color: #000000 !important; } /* Sub-menu items which are being hovered */ #menu1 .current_page_item ul a:hover, #menu1 .current_page_item ul a:active { /* Set this to the same color as Link Color: Hover in MENU 1 (Page Menu) */ color: #FFFFFF !important; /* Vertical gradients, change colors according to (top,bottom) */ background: -ms-linear-gradient(#444444, #111111) !important; background: -moz-linear-gradient(#444444, #111111) !important; background: -webkit-linear-gradient(#444444, #111111) !important; background: linear-gradient(#444444, #111111) !important; filter: progid:DXImageTransform.Microsoft.gradient(startColorStr='#444444', EndColorStr='#111111') !important; }
MENU 1 (Page Menu)
- Background color, Background color: Hover, Background color: Parent: Set these at appropriate colors to match your theme for old browsers which don't support gradients. They're fallbacks. (Example 2 uses 000000, F9F9F9, 000000, respectively)
- Border around all menu items: solid 0px transparent
- Link Color: Choose a light link color (Example 2 uses FFCC33)
- Link Color: Hover: Choose a dark hover color (Example 2 uses 000000)
- White or Black Arrows as Sub Menu Indicator?: white
Add HTML/CSS Inserts - Adjustable styles are marked by comments
Code:
/* The main horizontal bar's background */ #menu1 ul.rMenu-hor, #menu1 ul.rMenu-ver { padding-left: 0px !important; /* Set this to Background Color in MENU 1 (Page Menu) - it is a fallback for older browsers */ background-color: #000000; /* Vertical gradients, change colors according to (top,bottom) */ background: -ms-linear-gradient(#252525, #0A0A0A) !important; background: -moz-linear-gradient(#252525, #0A0A0A) !important; background: -webkit-linear-gradient(#252525, #0A0A0A) !important; background: linear-gradient(#252525, #0A0A0A) !important; filter: progid:DXImageTransform.Microsoft.gradient(startColorStr='#252525', EndColorStr='#0A0A0A') !important; /* IE7,8,9 */ } #menu1 ul.rMenu-ver { margin-top: 0 !important; } #menu1 .rMenu-hor a { font-weight: bold !important; /* Personal preference */ line-height: 2.0em !important; /* This adjusts the height of the menu bar */ } #menu1 .rMenu-ver a { line-height: 1.2em !important; /* This adjusts the height of items in the submenus */ } #menu1 li { margin: 0 !important; background-color: transparent !important; } /* Hovered items and current page items get these backgrounds */ #menu1 a:hover, #menu1 a:active, #menu1 .current_page_item a:link, #menu1 .current_page_item a:visited { /* Vertical gradients, change colors according to (top,bottom) */ background: -ms-linear-gradient(#F9F9F9, #E5E5E5) !important; background: -moz-linear-gradient(#F9F9F9, #E5E5E5) !important; background: -webkit-linear-gradient(#F9F9F9, #E5E5E5) !important; background: linear-gradient(#F9F9F9, #E5E5E5) !important; filter: progid:DXImageTransform.Microsoft.gradient(startColorStr='#F9F9F9', EndColorStr='#E5E5E5') !important; } /* Sub-menu items which should not be highlighted */ #menu1 .current_page_item ul a:link, #menu1 .current_page_item ul a:visited { background: transparent !important; filter: progid:DXImageTransform.Microsoft.gradient(enabled=false) !important; /* Set this to the same color as Link Color in MENU 1 (Page Menu) */ color: #FFCC33 !important; } /* Sub-menu items which are being hovered */ #menu1 .current_page_item ul a:hover, #menu1 .current_page_item ul a:active { /* Set this to the same color as Link Color: Hover in MENU 1 (Page Menu) */ color: #000000 !important; /* Vertical gradients, change colors according to (top,bottom) */ background: -ms-linear-gradient(#F9F9F9, #E5E5E5) !important; background: -moz-linear-gradient(#F9F9F9, #E5E5E5) !important; background: -webkit-linear-gradient(#F9F9F9, #E5E5E5) !important; background: linear-gradient(#F9F9F9, #E5E5E5) !important; filter: progid:DXImageTransform.Microsoft.gradient(startColorStr='#F9F9F9', EndColorStr='#E5E5E5') !important; }
Width of Menu Bar: You can control the width of the menu bar by including "width:80%;" in the CSS for #menu1 ul.rMenu-hor and #menu1 ul.rMenu-ver. Of course, change 80% to whatever width you prefer, or even specify something like 800px. You can align the bar left, center, or right. Below are some example CSS edits for each alignment. Choose one, don't blindly copy the whole thing. (Note that this is different from specifying %page-center or %page-right in the Atahualpa options for Configure Header Area. In that case the bar extends the entire width and only the menu items are shifted. You can actually use this tip in conjunction with that setting to move both the shrunk bar and the menu items around.)
Code:
/* Shrink width of bar and align left, right, or center - choose only one! */ #menu1 ul.rMenu-hor, #menu1 ul.rMenu-ver { /* Align left */ width: 80%; /* Align center */ width: 80%; margin-left: auto; margin-right: auto; /* Align right */ width: 80%; margin-left: auto; margin-right: 0; .... and so on with the rest of the CSS from the above examples ... }