Forum Moderators: not2easy
#button {
width: 124px;
padding:0;
margin:0;
border:0;
font-family: Arial,Helvetica,sans-serif;
font-size: 11px;
color: #FFF;
}
#button ul {
list-style: none;
margin: 0;
padding: 0;
border: none;
}
#button li {
margin: 0;
}
#button li a {
display: block;
height: 22px;
padding: 5px;
color: #fff;
font-weight: bold;
text-decoration: none;
width: 100%;
line-height: 12px;
vertical-align: middle;
}
html>body #button li a {
width: auto;
}
#button li a:hover {
border: 2px solid #fc0;
padding: 3px;
color: #fff;
}
I just need the most elegant way to override. Thanks!
Tim
It's generally good practice not to include a link to the curent page in your navigation.
If there's some reason to have a link to your current page, then you could try identifying the nav button with its own id and overriding the hover, eg:
li#current a:hover {
border: 0;
padding: 0;
}
id to the body of each page. Then you can adjust your link hover effect based on that. e.g.
<body id="page2">
<ul>
<li id="p1lnk"><a href="page1.html">1</a></li>
<li id="p2lnk"><a href="page2.html">2</a></li>
<li id="p3lnk"><a href="page3.html">3</a></li>
</ul>
#page1 #p1lnk a:hover, #page2 #p2lnk a:hover, #page3 #p3lnk a:hover {
border: none;
padding: 5px;
}
This technique is also useful for identifying the current page by changng the colour of the link or its background.