Page is a not externally linkable
- Code, Content, and Presentation
-- CSS
---- Active link not underlined


nigelt74 - 10:49 pm on Nov 5, 2009 (gmt 0)


Hi all

first I have validated my CSS on the w3C thingie and it tells me

This document validates as CSS level 2.1

My document type is

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">

By default my links are not underlined
What i want to happen is that when i hover over a link for an underline to appear (this works), and i want the current active link to be underlined, so for instance if I am on the about page the about link is underlined

Here is the relevant CSS


.smallhead {
font-size: 18px;
color: #fff;
}
.smallheadnav {
font-size: 18px;
text-align: right;
color: #fff;
text-decoration: none;
}
span.left {
position: absolute;
left: 0;
}
span.right {
position: absolute;
right: 0;
}
div.line {
font-size: 18px;
position: relative;
text-align: center;
width: 100%;
}
a.smallheadnav:link { text-decoration: none; }
a.smallheadnav:visited { text-decoration: none; }
a.smallheadnav:hover { text-decoration: underline; }
a.smallheadnav:active { text-decoration: underline; }

And here is the section of HTML it should be acting on


<div class="line">
<span class="left">Hedgehog Fancier</span>
<span class="right">
<a class="smallheadnav" href="about.php">About</a>&nbsp;&nbsp;
<a class="smallheadnav" href="index.php">Portfolio</a>&nbsp;&nbsp;
<a class="smallheadnav" href="/blog">Blog</a>&nbsp;&nbsp;
<a class="smallheadnav" href="index.php">Bla</a>&nbsp;&nbsp;
<a class="smallheadnav" href="index.php">Bla</a>&nbsp;&nbsp;
</span>
</div>

currently only the Hover works, and i have no idea why the active doesn't, I am not good at CSS, but i can normally muddle through, but this which i believe should be simple has just stumped me completely.

Any help would be greatly appreciated


Thread source:: http://www.webmasterworld.com/css/4019999.htm
Brought to you by WebmasterWorld: http://www.webmasterworld.com