J
jonefer
I've read several examples of how to create CSS to highlight the current
page- particularly the following example:
<ul id="navlist">
<li><a href="index.html" id="homenav">Home</a></li>
<li><a href="products.html" id="prodnav">Products</a></li>
<li><a href="faq.html" id="faqnav">FAQ</a></li>
<li><a href="contact.html" id="connav">contact us</a></li>
</ul>
<body id="home">
body#home a#homenav,
body#products a#prodnav,
body#faq a#faqnav,
body#contact a#connav {
color: #fff;
background: #930;
}
Before reading these examples, I managed to produce the following working
menu and CSS: How do I incorporate the example above into my current menu and
CSS below:
<div style="z-index: 101; left: 0px; width: 960px; position: absolute; top:
24px;
height: 48px; background-color: #000000;">
<div style="border-right: #3399cc thin solid; z-index: 100;
left: 472px; width: 72px;
position: absolute; top: 0px; height: 16px">
<asp:LinkButton ID="lnkService" runat="server"
CssClass="NavLink" width="64px">Service</asp:LinkButton> </div>
<div style="border-right: #3399cc thin solid; z-index: 100;
left: 552px; width: 72px;
position: absolute; top: 0px; height: 16px">
<asp:LinkButton ID="lnkAccess" runat="server"
CssClass="NavLink" Width="64px">Access</asp:LinkButton> </div>
<div style="border-right: #3399cc thin solid; z-index: 100;
left: 632px; width: 72px;
position: absolute; top: 0px; height: 16px">
<asp:LinkButton ID="lnkQuality" runat="server"
CssClass="NavLink" Width="64px">Quality</asp:LinkButton> </div>
<div style="border-right: #3399cc thin solid; z-index: 100;
left: 712px; width: 72px;
position: absolute; top: 0px; height: 16px">
</div>
my css
..NavLink
{
background-color: #000000;
font-family: Century Gothic;
font-size: 11px;
color: #6699cc;
font-weight: bold;
text-decoration: none;
}
..NavLink:hover
{
background-color: white;
font-family: Century Gothic;
font-size: 11px;
color: black;
font-weight: bold;
text-decoration: none;
border-right: #3399cc thin solid;
border-top: #3399cc thin solid;
border-left: #3399cc thin solid;
border-bottom: #3399cc thin solid;
}
page- particularly the following example:
<ul id="navlist">
<li><a href="index.html" id="homenav">Home</a></li>
<li><a href="products.html" id="prodnav">Products</a></li>
<li><a href="faq.html" id="faqnav">FAQ</a></li>
<li><a href="contact.html" id="connav">contact us</a></li>
</ul>
<body id="home">
body#home a#homenav,
body#products a#prodnav,
body#faq a#faqnav,
body#contact a#connav {
color: #fff;
background: #930;
}
Before reading these examples, I managed to produce the following working
menu and CSS: How do I incorporate the example above into my current menu and
CSS below:
<div style="z-index: 101; left: 0px; width: 960px; position: absolute; top:
24px;
height: 48px; background-color: #000000;">
<div style="border-right: #3399cc thin solid; z-index: 100;
left: 472px; width: 72px;
position: absolute; top: 0px; height: 16px">
<asp:LinkButton ID="lnkService" runat="server"
CssClass="NavLink" width="64px">Service</asp:LinkButton> </div>
<div style="border-right: #3399cc thin solid; z-index: 100;
left: 552px; width: 72px;
position: absolute; top: 0px; height: 16px">
<asp:LinkButton ID="lnkAccess" runat="server"
CssClass="NavLink" Width="64px">Access</asp:LinkButton> </div>
<div style="border-right: #3399cc thin solid; z-index: 100;
left: 632px; width: 72px;
position: absolute; top: 0px; height: 16px">
<asp:LinkButton ID="lnkQuality" runat="server"
CssClass="NavLink" Width="64px">Quality</asp:LinkButton> </div>
<div style="border-right: #3399cc thin solid; z-index: 100;
left: 712px; width: 72px;
position: absolute; top: 0px; height: 16px">
</div>
my css
..NavLink
{
background-color: #000000;
font-family: Century Gothic;
font-size: 11px;
color: #6699cc;
font-weight: bold;
text-decoration: none;
}
..NavLink:hover
{
background-color: white;
font-family: Century Gothic;
font-size: 11px;
color: black;
font-weight: bold;
text-decoration: none;
border-right: #3399cc thin solid;
border-top: #3399cc thin solid;
border-left: #3399cc thin solid;
border-bottom: #3399cc thin solid;
}