Problem with a:link style, getting frustrated...

liunx

Guest
Working on a new site and for some reason the style won't load the a:link {etc...}<br />
it does load the a:hover. I have another page that is using a similar style and it loads fine. I've tried <link rel...> and a global, and it won't work in netscape or IE.<br />
<br />
can anyone spot an error? I can't seem to find where the problem is.<br />
<br />
<style type="text/css"><br />
<br />
<!-- .majorlink class inside colored table cell --><br />
<!--<br />
.majorlink a:link {text-decoration:none; font-family:helvetica, geneva, arial; font-weight:bold; color:#ffffff;}<br />
<br />
.majorlink a:visited {text-decoration:none; font-family:helvetica, geneva, arial; font-weight:bold; color:#ffccff;}<br />
<br />
.majorlink a:active {text-decoration:none; font-family:helvetica, geneva, arial; font-weight:bold; color:#ffccff;}<br />
<br />
.majorlink a:hover {text-decoration:none; font-family:helvetica, geneva, arial; font-weight:bold; color:#cc99cc;}<br />
<br />
...more styles...<br />
</style><br />
<br />
the link is inside a table, and I finally got the a:hover to work using<br />
<td><span class="majorlink"><a href=http://www.htmlforums.com/archive/index.php/"link">link</a></span></td><br />
<br />
:confused:<!--content-->try putting the class into the <a href> and see what it does.<!--content-->tried<br />
<a class="majorlink" href=http://www.htmlforums.com/archive/index.php/"link.html">link</a><br />
and it ignored all the styles.<!--content-->got it to work, evidently this line was screwing it all up<br />
<!-- .majorlink class inside colored table cell --><br />
<br />
although it still won't work with the class inside the <a href>...hmmm<br />
<br />
thanks for the suggestion transmothra.<!--content-->When you comment within a CSS area, you should use a different set of comment tags.<br />
<br />
<!-- html comment area --><br />
<br />
/* css comment area */<br />
<br />
That may or may not be a factor in your case.<!--content-->I would use A.majorlink:link and A.majorlink:hover and so on instead of .majorlink A:link as you do.<!--content-->...but I don't know if it matters.<!--content-->Run the CSS through this checker: <!-- m --><a class="postlink" href="http://jigsaw.w3.org/css-validator/validator-uri.html">http://jigsaw.w3.org/css-validator/validator-uri.html</a><!-- m --><br />
<br />
Run the HTML through another checker: <!-- m --><a class="postlink" href="http://validator.w3.org/detailed.html">http://validator.w3.org/detailed.html</a><!-- m --><br />
<br />
If it is a typo somewhere, then it will soon be found.<!--content-->
 
Back
Top