How to Rollover the Horizontal Navigation Bar
- 1). Open your HTML file in Notepad or your preferred plain text editor. Add this code to your cascading style sheet that passes controls to your menu:
#navcontainer ul
{
padding-left: 0;
margin-left: 0;
background-color: #036333;
color: White;
float: left;
width: 100%;
font-family: arial, helvetica, sans-serif;
}
#navcontainer ul li { display: inline; }
#navcontainer ul li a
{
padding: 0.2em 1em;
background-color: #036333;
color: White;
text-decoration: none;
float: left;
border-right: 1px solid #fff;
}
#navcontainer ul li a:hover
{
background-color: #369888;
color: #fff;
} - 2). Replace both instances of "036333" with the desired color code for the menu bar and buttons when no one is mousing over them. Replace "369888" with the desired color code for the buttons to change to when a visitor mouses over them (see Resources for hexadecimal color chart). Replace the color "White" with the color you want the button text to be. Replace "arial, helvetica, sans-serif" with the desired font name.
- 3). Add this code between the body tags of your HTML document:
<div>
<ul>
<li><a href="/links/?u=http://www.itemonelink.com">Item One</a></li>
<li><a href="/links/?u=http://www.itemtwolink.com">Item Two</a></li>
<li><a href="/links/?u=http://www.itemthreelink.com">Item Three</a></li>
<li><a href="/links/?u=http://www.itemfourlink.com">Item Four</a></li>
<li><a href="/links/?u=http://www.itemfivelink.com">Item Five</a></li>
</ul>
</div> - 4). Replace "Item One," "Item Two," etc., with the names of each button. Replace each of the URLs on the same line as the item names with the specific link where you want visitors directed when they click that button.
- 5). Save and upload your HTML file.
Source...