link="red" alink="red" vlink="red"

liunx

Guest
well i need to know if it is possible to start as:<br />
e.g <br />
link="red" alink="red" vlink="red" <br />
<br />
then on the same page but in a different table use this:<br />
e.g <br />
link="green" alink="green" vlink="green" <br />
<br />
if yes how??:confused:<!--content-->give the tables seperated classes,<br />
in your head:<br />
<style type="text/css"><br />
table.table1 {<br />
link="red" alink="red" vlink="red" <br />
}<br />
table.table2 {<br />
link="green" alink="green" vlink="green" <br />
}<br />
<br />
that this in your body tag:<br />
<br />
<table class="table1" border="0"><br />
<tr><br />
<td>Test blabalbal</td><br />
</tr><br />
</table><br />
<br />
<table class="table2" border="0"><br />
<tr><br />
<td>Test blabalbal</td><br />
</tr><br />
</table>[<!--content-->HTML PAGE - Anything.html<br />
<br />
<html><br />
<head><br />
<link rel="stylesheet" type="text/css" href=http://www.htmlforums.com/archive/index.php/"stylesheet.css" /><br />
<title>hellow</title><br />
</head><br />
<body><br />
<a href=http://www.htmlforums.com/archive/index.php/"#" class="green">GREEN</a><br />
<a href=http://www.htmlforums.com/archive/index.php/"#" class="red">RED</a><br />
</body><br />
</html><br />
<br />
CSS PAGE - stylesheet.css<br />
<br />
a:link.red {color: red}<br />
a:visited.red {color: red}<br />
a:hover.red {color: red}<br />
a:active.red {color: red}<br />
<br />
a:link.green {color: green}<br />
a:visited.green {color: green}<br />
a:hover.green {color: green}<br />
a:active.green {color: green}<!--content-->Almost correct. Whilst that code will generally work OK, it is not such a good idea to name the classes as "red" and "green". What if, next week you want those links to be blue and orange? You will then have a problem, as the "red" class will be giving blue links, and the "green" class giving orange links. It is far better to name your classes with some meaningful names like "error", "warning", "normal", "adverts", "corporate", "offsite", and so on. That is, name classes by what the actual function of the link is, not what style is going to be applied.<!--content-->Tooshay, Giz. ;)<!--content-->
 
Back
Top