:hover underline not working in FF

liunx

Guest
Ok, another weird problem...I have a link on one page that is set to underline on hover, it works fine in IE and Opera, but not in FF or Netscape, where is just does nothing. It does the correct thing on :focus and :active.


#staff a {
font-size: 1.5em;
text-align: center;
color: #000;
text-decoration: none;
}
#staff a:visited {
color: #000;
text-decoration: none;
}
#staff a:focus {
color: #000;
text-decoration: underline;
}
#staff a:hover {
color: #000;
text-decoration: underline;
}
#staff a:active {
color: #999;
text-decoration: none;
}


<div id="staff">
<a href=http://www.webdeveloper.com/forum/archive/index.php/"staff.html">Staff</a>
</div>


Hmm, I just tried that code alone on a new page and it works....so I guess something else on the page is doing it.

I've tried just doing the link behavior with a .staff class, it does the same thing. However, when I change the same link to a .nav class, it works fine. Here's that code:


a.nav {
color: #000;
text-decoration: underline;
padding: 0;
margin: 0;
}
a.nav:visited {
color: #000;
text-decoration: underline;
}
a.nav:focus {
color: #999;
text-decoration: underline;
}
a.nav:hover {
color: #999;
text-decoration: underline;
}
a.nav:active {
color: #999;
text-decoration: none;
}After more experimenting, it seems that it only does this when I change the font size to >1em. If I make it larger using px instead of em, it doesn't have a problem. So I can fix it, but why won't it work in the first place?There must be another problem on your page, because your code works fine for me (<!-- m --><a class="postlink" href="http://bonrouge.com/test/staff.htm">http://bonrouge.com/test/staff.htm</a><!-- m -->).Buggy
The underline does not work with charset=shift_jis in FF
Use:<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
The underline in IE remains 'thin' and is not affected by font-size
Use:#staff a:hover {
color: #000;
border-bottom:8px solid black;
}

The result is not exactly the same as underline in FF. You may need to tweek the margin and padding.Buggy
The underline does not work with charset=shift_jis in FF

Works fine for me - I see no problems at all.How is the character encoding set in your browser?Auto-detect>Japanese (but when I look at this page it comes up as Western (ISO-8859-1))Using Auto-detect>Japanese will display the underline on your test page.
The default is Auto-detect>(Off), which does not display the underline.
Only use charset=shift_jis if content is Japanese.I see...
 
Back
Top