...

View Full Version : a:hover attribute



EricaStar
11-03-2006, 07:37 PM
Hello All.

Why are my links rendering wrong. The topnav links are rendering with Underlines (except for the first). They are supposed to only show underlines when it is hovered. The classbuttons are rendering with underlines too eventhough the underlines are only supposed to display when hovered.

Also, can someone please tell me why when you hit the back button the previously clicked link displays as if it is the 'active' page link.

I am attaching the css file. The relevant html code is below:

<div id="hd">
<div>
<TABLE id="Table1" cellSpacing="0" cellPadding="0" width="100%" border="0">
<TR>
<TD width="50%" class="topnav">
<a href="index.aspx">Links</a> | <a href="test.html">Links</a> | <a href="test.html">Links</a> | <a href="test.html">Links</a>
</TD>
<td align="right" width="50%" class="topnav">
<a href="test.html">Other Links</a> | <a href="test.html">Other Links</a>
</td>
</TR>
</TABLE>
</div>

<div class="mainbackground">
<div class="logoContainer">
<img src="images/star-one-logo-long-color.gif" name="intranetLogo" width="232" height="68" id="intranetLogo">
</div>
<div class="SearchWrapper"></div>
</div>
</div>
<!--header-->

<div id="bd">
<div id="LeftMainNav" class="yui-b" >
<div id="Email" class="classButtons"><a href="test.html">E-mail</a></div>
<div id="Contacts" class="classButtons"><a href="test.html">Contacts</a></div>
<div id="Flyer" class="classButtons"><a href="test.html">Flyer Program</a></div>
</div>
<div id="yui-main">
<div class="yui-b">
<div class="yui-ge">
<div class="yui-u first">It is me too!</div>
<div class="yui-u">It is me thrid!</div>
</div>
</div>
</div>
</div>

<!--body-->

_Aerospace_Eng_
11-03-2006, 07:40 PM
Change this

.topnav a:link {
font-size:12px;
color:#0000FF;
text-decoration:none;
}

.topnav a:hover {
font-size:12px;
color:#006600;
text-decoration:underline;
}

.topnav a:active {
font-size:12px;
color:#000000;
text-decoration:none;
}
to this

.topnav a, .topnav a:link, .topnav a:visited {
font-size:12px;
color:#0000FF;
text-decoration:none;
}

.topnav a:hover {
font-size:12px;
color:#006600;
text-decoration:underline;
}

.topnav a:active {
font-size:12px;
color:#000000;
text-decoration:none;
}



EZ Archive Ads Plugin for vBulletin Copyright 2006 Computer Help Forum