Forum Moderators: not2easy
All of a sudden my links don't become underlined when I hover them in Firefox. I don't think I changed anything, in IE6 they work fine.
div.link a:link {
color: #ff8000;
text-decoration: none;
}
div.link a:hover {
color: #ffff00;
text-decoration: underline;
}
<div class="link"><a href="http://www.somewhere.com">Test Link</a></div>
What the hell is going on?
Take care,
Emperor
Well, it works now. I have no idea what was causing it or why it started working again (or why it stopped to begin with.) The color was changing but the underline was not showing up.
Maybe it's a little bug in Firefox, because after I reset my computer this morning it worked fine; the only thing I did between last night when it wasn't working and today was reset, the code is exactly the same.
Take care,
Cyrus
Maybe it has to do with the font-family or white-space: pre I use. Here is the exact code:
div.linklist {
font-family: courier, monospace;
}
div.link {
overflow: hidden;
width: 100%;
white-space: pre;
}
div.link a:link {
color: #c0c0c0;
text-decoration: none;
}
a:visited = same as above
div.link a:hover {
color: #ffffff;
text-decoration: underline;
}
a:active = same as above
<div class="linklist">
<div class="link">88888888 4444 <a href="http://www.somesite.org">Test Link</a></div>
</div>
If you load Firefox it has the default font size set, decrease it only once and you will see what I mean. It sucks because I worked hard getting the font sizes just right for default (medium in IE) and one level smaller.
Take care,
Cyrus
IE6 rules!
IE6 rules!
I'll take some minor text-decoration display bug at decreased font sizes (if that's what's happening here) over, say, the Peekaboo Bug, the Guillotine Bug, the Whitespace in Lists Bug, the Unscrollable Content Bug, that funky 100%+ thing IE6 does with float-adjacent <div>s, the Three Pixel Text Jog, the Double Margin Bug, the Missing Images Bug, the Escaping Floats Bug, ... need I go on? These are ALL IE specific issues.
If IE6 rules, it's only because it's the inbred, thin-blooded heir to a once great (debateable?) empire.
If you load Firefox it has the default font size set, decrease it only once and you will see what I mean. It sucks because I worked hard getting the font sizes just right for default (medium in IE) and one level smaller.
Can't reproduce your bug using the code you posted in an xhtml strict document (it's the fourth [ctrl][-] before the underline disappears, and by then the text is only about one pixel high anyhow...) It makes no difference whether the link is 'fresh', or visited.
Is the browser in quirks mode or standards mode when the problem occurs?
-B
linkbug.css
body {
background-color: #000000;
color: #c0c0c0;
}
div.linklist {
font-family: courier,monospace;
}
div.link {
overflow: hidden;
width: 100%;
}
a:link {
color: #c0c0c0;
text-decoration: none;
}
a:hover {
color: #ffffff;
text-decoration: underline;
}
linkbug.htm
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<title>Firefox Bug</title>
<meta http-equiv="content-type" content="text/html; charset=ISO-8859-1" />
<link rel="stylesheet" type="text/css" href="linkbug.css" />
</head>
<body>
<div class="linklist">
<div class="link"><a href="http://www.google.com">Google</a></div>
<div class="link"><a href="http://www.yahoo.com">Yahoo</a></div>
</div>
</body>
</html>
Both the CSS and the XHTML validate with zero errors. I'm using WIn XP Pro SP2.
Take care,
Cyrus
This method is a little unreliable, and so is obviously not the best solution, but works well with values in the range of 1.5em.
It does seem like a bug, but it's pretty benign - and, as it turns out, easy to solve.
-B
Yes, I did notice that removing the overflow: hidden fixed the problem but that part is essential in my code, that's why I have the links in containers in the first place.
The code I gave only fails when the text size is Normal in Firefox, they are underlined when it is increased or decreased so it's realy weird.
Instead of having each link in it's own container I can probably just make a big container and use the white-space: pre to line everything up but I really didn't want to do it that way.
I think I will just leave it alone, I can't start altering my code because of a tiny bug in Firefox; this does certainly show that Firefox probably has some deep-rooted problems though.
Thanks for the help.
Take care,
Cyrus
Bizarrely, my links *do* underline on hover - but only visited links! Mouse over unvisited links and no underline...
Any ideas?
Robin
<No URLs, thanks. See TOS [WebmasterWorld.com] and CSS Forum Charter [WebmasterWorld.com]>
[edited by: SuzyUK at 6:49 pm (utc) on Feb. 16, 2005]