No doubt this is a very basic question, but how do you go about creating multiple styles (different styles) for links within the same page? For instance, if you go to
<!-- w --><a class="postlink" href="http://www.cnn.com">www.cnn.com</a><!-- w -->, you can see that they created different links with different ways of doing the rollovers. Some have blue text, rolling over to red with no underline, while others start as white text, rolling over to another color, etc.
Then, how do you go about assigning these values on the web page itself? Did they use multiple css pages? Or are all the values on a single one somewhere?
Thank you in advance.This has been answered at least 2 times the 3 last days, and probably about 20 times the last 2 months.
Please use search. Been there, tried that, but no doubt I'm not using the right keywords or something because all the returns I get have to do with javaScrip. I need to know how to do this in css.
Sorry if this topic has been covered many times by other newbies like me, but I do need to know the answer. Can you at least point me to the right post that already covered the subject?
Again, thanks in advance.hi willi...
the exact style sheet that CNN uses for that site is here:
<!-- m --><a class="postlink" href="http://i.cnn.net/cnn/.element/ssi/css/1.0/main.css">http://i.cnn.net/cnn/.element/ssi/css/1.0/main.css</a><!-- m -->
maybe that will help you connect all of the dots. respond back if you are still having trouble.
k
(stefan, why do you even respond if you are not going to help? i know that you find it tiresome answering many of the same questions over and over, but we've had this dicussion before, and no one is forcing you to respond at all. i really wish you wouldn't make people feel bad for asking questions. waizen has 7 posts on these boards. you have 986. do you really expect everybody to be as savy as you after only 7 posts? please try to be more positive. as a favor to me, at least? k)Create classes and id's and implement them when you want different styled links
ie
<a class="style1" href=http://www.webdeveloper.com/forum/archive/index.php/"blah.htm">blah</a>
<a class="style2" href=http://www.webdeveloper.com/forum/archive/index.php/"blah.htm">blah</a>
same link but can look totally differentHTML Goodies has a great tutorial on creating classes and ID'sIf you use HTML goodies tutorials, make sure you validate your pages later using <!-- m --><a class="postlink" href="http://validator.w3.org">http://validator.w3.org</a><!-- m -->
Some of the errors that the validator displays may be non-intuitive. But soon you'll learn.this should work.
<head>
<STYLE TYPE="text/css"><!--
a.red:link {text-decoration: none; color=#ff0000}
a.red:hover{text-decoration: underline; color="#ff0000"}
a.green:link {text-decoration: none; color=#00ff00}
a.green:hover {text-decoration: underline; color=#ffffff}
-->
</STYLE>
</head>
<body>
<a href=http://dsfdaf.com class=red>test1</a>
<a href=http://dgdsgsdg.com class=green>test2</a>
</body>
hope that was what you were after.
<!-- w --><a class="postlink" href="http://www.cnn.com">www.cnn.com</a><!-- w -->, you can see that they created different links with different ways of doing the rollovers. Some have blue text, rolling over to red with no underline, while others start as white text, rolling over to another color, etc.
Then, how do you go about assigning these values on the web page itself? Did they use multiple css pages? Or are all the values on a single one somewhere?
Thank you in advance.This has been answered at least 2 times the 3 last days, and probably about 20 times the last 2 months.
Please use search. Been there, tried that, but no doubt I'm not using the right keywords or something because all the returns I get have to do with javaScrip. I need to know how to do this in css.
Sorry if this topic has been covered many times by other newbies like me, but I do need to know the answer. Can you at least point me to the right post that already covered the subject?
Again, thanks in advance.hi willi...
the exact style sheet that CNN uses for that site is here:
<!-- m --><a class="postlink" href="http://i.cnn.net/cnn/.element/ssi/css/1.0/main.css">http://i.cnn.net/cnn/.element/ssi/css/1.0/main.css</a><!-- m -->
maybe that will help you connect all of the dots. respond back if you are still having trouble.
k
(stefan, why do you even respond if you are not going to help? i know that you find it tiresome answering many of the same questions over and over, but we've had this dicussion before, and no one is forcing you to respond at all. i really wish you wouldn't make people feel bad for asking questions. waizen has 7 posts on these boards. you have 986. do you really expect everybody to be as savy as you after only 7 posts? please try to be more positive. as a favor to me, at least? k)Create classes and id's and implement them when you want different styled links
ie
<a class="style1" href=http://www.webdeveloper.com/forum/archive/index.php/"blah.htm">blah</a>
<a class="style2" href=http://www.webdeveloper.com/forum/archive/index.php/"blah.htm">blah</a>
same link but can look totally differentHTML Goodies has a great tutorial on creating classes and ID'sIf you use HTML goodies tutorials, make sure you validate your pages later using <!-- m --><a class="postlink" href="http://validator.w3.org">http://validator.w3.org</a><!-- m -->
Some of the errors that the validator displays may be non-intuitive. But soon you'll learn.this should work.
<head>
<STYLE TYPE="text/css"><!--
a.red:link {text-decoration: none; color=#ff0000}
a.red:hover{text-decoration: underline; color="#ff0000"}
a.green:link {text-decoration: none; color=#00ff00}
a.green:hover {text-decoration: underline; color=#ffffff}
-->
</STYLE>
</head>
<body>
<a href=http://dsfdaf.com class=red>test1</a>
<a href=http://dgdsgsdg.com class=green>test2</a>
</body>
hope that was what you were after.