Link Rollovers...

liunx

Guest
Is there a way to affect only a specified group of links with the following code?<br />
<br />
<br />
<STYLE TYPE="text/css"><br />
a:link { color: blue; text-decoration: none }<br />
a:active { color: red; text-decoration: none }<br />
a:visited { color: blue; text-decoration: none }<br />
a:hover { color: green; text-decoration: underline }<br />
</STYLE><br />
<br />
<br />
The code normally affects every link on the page.<!--content-->Set a class on the links, and then set up your CSS like this:<br />
<br />
<style type="text/css"> <br />
a.links:link { color: blue; text-decoration: none } <br />
a.links:active { color: red; text-decoration: none } <br />
a.links:visited { color: blue; text-decoration: none } <br />
a.links:hover { color: green; text-decoration: underline } <br />
</style><br />
</head><br />
<body><br />
<p><a href=http://www.webdeveloper.com/forum/archive/index.php/"http://www.w3c.org" class="links">Link with CSS</a></p><br />
<p><a href=http://www.webdeveloper.com/forum/archive/index.php/"http://www.w3c.org">Link without CSS</a></p><!--content-->Okay, thanks. I should have known it would be something like that, but I'm really new to CSS.<!--content-->No problem... Happy to help. :)<!--content-->
 
Back
Top