applying styles to links

I put this code in the header but is seems to ignore the a:link completely: the link (unvisited) becomes whatever the visited code link properties are, as a result the visited link does not reflect as such.<br />
<br />
<STYLE TYPE="text/css"><br />
<!--<br />
a:link {font-family: Arial;font-size:9pt; color:#000000;text-decoration:underline}<br />
a:visited {font-family: Arial;font-size:9pt; color:#CCCCCC;}<br />
a:hover {font-family: Arial;font-size:9pt; color:#FFCC66;}<br />
--> </STYLE><br />
<br />
Also, how can I get a style to apply to only part of the web layout?<br />
I have broken up my web page layout into various tables within a table, am applying css to the menus but want a different link style for the content links.<!--content--><!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN"<br />
"http://www.w3.org/TR/html4/strict.dtd"><br />
<html lang="en"><br />
<head><br />
<title>css links</title><br />
<meta http-equiv="Content-Type" content="text/html; charset=utf-8"><br />
<style type="text/css"><br />
<!--<br />
body {<br />
font-size:1em;<br />
} <br />
a {<br />
font:Arial, Helvetica, sans-serif;<br />
font-size:medium;<br />
color:#000000;<br />
background:#ffffff;<br />
}<br />
a:visited {<br />
color:#cccccc;<br />
background:#ffffff;<br />
}<br />
a:hover {color:#ffcc66;<br />
background:#ffffff;<br />
}<br />
#content a {<br />
font:Arial, Helvetica, sans-serif;<br />
font-size:large;<br />
color:#0000ff;<br />
background:#ffffff;<br />
}<br />
--><br />
</style><br />
<br />
</head><br />
<body><br />
<a href=http://www.webdeveloper.com/forum/archive/index.php/"http://www.mysite.com" title="link to mysite">mysite</a><br />
<div id="content"><br />
<a href=http://www.webdeveloper.com/forum/archive/index.php/"http://www.mysite2.com" title="link to mysite2">mysite2</a><br />
</div><br />
</body><br />
</html><br />
<br />
BTY do not use (nested) tables for layout<!--content-->Thanks for the help, much appreciated. Tables work for me, thanks<!--content-->Originally posted by sash <br />
I put this code in the header but is seems to ignore the a:link completely: the link (unvisited) becomes whatever the visited code link properties are, as a result the visited link does not reflect as such.<br />
<br />
<STYLE TYPE="text/css"><br />
<!--<br />
a:link {font-family: Arial;font-size:9pt; color:#000000;text-decoration:underline}<br />
a:visited {font-family: Arial;font-size:9pt; color:#CCCCCC;}<br />
a:hover {font-family: Arial;font-size:9pt; color:#FFCC66;}<br />
--> </STYLE> <br />
<br />
Yeah, I noticed myself that a:link { doesn't work in IE 6. It has to be just a {<br />
<br />
Anyone know why? Quirks mode or something like that?<!--content-->Could you supply a link? Links styling is the one thing I've always been able to depend upon, myself, quirks mode in IE even. And, Sash, take a look at this (<!-- m --><a class="postlink" href="http://www.csszengarden.com/">http://www.csszengarden.com/</a><!-- m -->) and please reconsider tables. I won't nag you anymore, but you have to admit- CSS kix some serious boo-tay. :D I'm not going to nag, just please look at the above link as well as this one (<!-- m --><a class="postlink" href="http://tech.irt.org/articles/js135/">http://tech.irt.org/articles/js135/</a><!-- m -->) so I can feel useful. ;)<!--content-->Even the lowly M$ Explorer understands a:link I suspect you made a typographical error somewhere in your code.<br />
<br />
<style type="text/css"><br />
<!--<br />
a:link { color:green;}<br />
a:visited {color:red;}<br />
a:hover {color:yellow;}<br />
--> <br />
</style><!--content-->Originally posted by starrwriter <br />
Yeah, I noticed myself that a:link { doesn't work in IE 6<br />
<br />
I actually don't use the :link part.<!--content-->Originally posted by sash <br />
I put this code in the header but is seems to ignore the a:link completely: the link (unvisited) becomes whatever the visited code link properties are, as a result the visited link does not reflect as such.<br />
<br />
<STYLE TYPE="text/css"><br />
<!--<br />
a:link {font-family: Arial;font-size:9pt; color:#000000;text-decoration:underline}<br />
a:visited {font-family: Arial;font-size:9pt; color:#CCCCCC;}<br />
a:hover {font-family: Arial;font-size:9pt; color:#FFCC66;}<br />
--> </STYLE> <br />
<br />
This can be optimized to save bandwidth and increase user satisfaction. Here is an optimized version: <br />
<br />
<STYLE TYPE="text/css"><!--<br />
a{font: 9pt Arial;text-decoration:underline}a:link{color:#000}a:visited{color:#CCC}a:hover{color:#FC6}<br />
--></STYLE><!--content-->Maybe, but a:link { } has always worked fine for me. I test my pages in Firfox, IE 6, and Opera, and it never gave me an issue. However, when making sites, it is my personal preference to keep a:link and a:visted the same, as I find the different link colors a tad bit annoying. I prefer a more uniform look for the links.<!--content-->When a user first visits, the look will be uniform. Then, as s/he visits more pages, s/he will be able to tell where s/he has been or not, and that's a good thing IMO<!--content-->Originally posted by omega <br />
Could you supply a link? Links styling is the one thing I've always been able to depend upon, myself, quirks mode in IE even. And, Sash, take a look at this (<!-- m --><a class="postlink" href="http://www.csszengarden.com/">http://www.csszengarden.com/</a><!-- m -->) and please reconsider tables. I won't nag you anymore, but you have to admit- CSS kix some serious boo-tay. :D I'm not going to nag, just please look at the above link as well as this one (<!-- m --><a class="postlink" href="http://tech.irt.org/articles/js135/">http://tech.irt.org/articles/js135/</a><!-- m -->) so I can feel useful. ;) <br />
<br />
Work on an Intranet so can't give you a link but thanks for the input.As for CSS, yes well, I have been reading up more about it after seeing all you guys making a fuss about it. Just another thing to learn , thanks for the link.<!--content-->Personally, I find a a slight color change to the visited link to be acceptable. If it's anything drastic, it's rather irritating.<!--content-->
 
Back
Top