I'm a bit of a novice with CSS and currently banging my head against the table trying to figure out whats wrong with my code. The HTML:
<div id="loginForm">
<span class="dottedLink"><a href="resetlogin">Recover login details</a></span><br>
<span class="dottedLink"><a href="signup">Create an account</a></span>
</div>
<div id="mainpageSplashImage"></div><br>
<div id="titleDesciption">This is the Title</div>
<div id="registerButtonPlacement"><a href="signup" class="linkButton">Register</a></div>
The CSS:
.dottedLink {
font-family: sans-serif;
font-size: .9em;
}
.dottedLink a, a:visited, a:active {
color: #0099CC;
text-decoration: none;
border-bottom: 1px dotted;
}
.dottedLink a:hover {
text-decoration: none;
border: none;
color: #990000;
}
.linkButton {
background: #CC0000;
border: 1px solid #888888;
padding: 5px;
color: #FFF;
font-size: 1em;
cursor: pointer;
font-family: sans-serif;
text-align: center;
text-decoration: none;
border-bottom: none;
}
.linkButton a, a:active, a:visited {
color: #FFFFFF;
}
.linkButton:hover {
background: #FFFFFF;
border: 1px solid #888888;
padding: 5px;
color: #CC0000;
font-size: 1em;
cursor: pointer;
text-decoration: none;
}
The main problem being, I cannont change the 'color' property (and ONLY the 'color' property) of 'dottedLink' without also changing the color property of 'linkButton'. Meaning, if i change the color of one class, the color o the other class also automatically changes. I've tested this in other browsers, and it seems to only be happening in firefox and I don't know why. Please help, this is so frustrating
atag from the.dottedLinkclass in css, maybe that might solve the issue.linkButton a, a:active, a:visitedyou have commas separating a few different elements. one of them beinga:visited. This is probably the color you're seeing on any link that has been visited