Forum Moderators: not2easy
li.horizontal:hover{
background: #cccccc;
}
The son of suckerfish menu uses JavaScript (for the sole benefit of IE) to imitate the :hover pseudo class by applying a function to the onmouseover and onmouseout events.
If you have an <a. element in the <li>, you have to set the <a> to display: block. Below are two CSS for a horizontal and vertical navigation. Pay attention though, while they look similar, there are subtle differences. Hope it helps.
HORIZONTAL
#top_nav_bar {
width: 900px;
height: 50px;
margin: 5px 0;
padding: 0;
font-size: 15px;
line-height: 50px;
color: #FFF;
text-align: center;
background-color: #FFF;
}
ul#top_nav {
width: 900px;
margin: 0;
padding: 0;
list-style-type: none;
}
ul#top_nav li {
font-size: 15px;
line-height: 50px;
text-align: center;
display: block;
float: left;
}
ul#top_nav li a, ul#top_nav li a:visited {
width: 149px;
height: 50px;
margin-left: 1px;
color: #FFF;
text-decoration: none;
background-color: #EC0034;
display: block;
}
ul#top_nav li a:hover {
color: #FFF;
background-color: #F8B208;
}
VERTICAL
#left_nav {
width: 296px;
height: 100%;
margin: 0;
padding: 0;
font-size: 15px;
line-height: 70px;
color: #FFF;
text-align: center;
vertical-align: middle;
background-color: #FFF;
float: left;
}
#left_nav ul {
width: 296px;
margin: 0;
padding: 0;
list-style-type: none;
}
#left_nav ul li {
font-size: 15px;
line-height: 70px;
text-align: center;
display: inline;
}
#left_nav ul li a, #top_nav ul li a:visited {
width: 296px;
height: 70px;
margin: 2px 0;
color: #FFF;
text-decoration: none;
background-color: #55006A;
display: block;
}
#left_nav ul li a:hover {
color: #FFF;
background-color: #A068B0;
}
Marshall