Re: Changing "link" properties using style sheets...

by =?iso-8859-1?Q?Josu=E9?= Figueira Machado <jmachado(at)mindspring.com>

 Date:  Thu, 17 Jan 2002 13:29:00 -0500
 To:  "Michael Boyer" <galdor7(at)hotmail.com>,
hwg-style(at)hwg.org
 In-Reply-To:  hotmail
  todo: View Thread, Original
<html>
Michael,<br><br>
It can, but you need to specify the class for each link. Something like
this:<br><br>
<font size=3D4>a:link { color: red }<br>
a.</font>council<font size=3D4>:visited { color: blue }<br><br>
&lt;.a </font>class=3D&quot;council&quot;
href=3D&quot;mayor.shtml<font size=3D4>&gt;Your link&lt;./a&gt;<br><br>
Check
<a href=3D"http://www.w3.org/TR/REC-CSS2/selector.html#link-pseudo-classes" =
eudora=3D"autourl">http://www.w3.org/TR/REC-CSS2/selector.html#link-pseudo-c=
lasses</a>
if this is not clear. HTH,<br><br>
Josu=E9<br><br>
<br><br>
</font>At 10:57 AM 1/17/2002 -0500, Michael Boyer wrote:<br>
<blockquote type=3Dcite class=3Dcite cite>I was under the impression that=
 the &quot;link&quot; property could be changed with a &quot;class&quot;=
 specification but I can't seem to get it working. How do I go about having=
 differen't links have different properties to them using style=
 sheets?<br><br>
Here's what I have for my style sheet and what I'm trying to do:<br><br>
<br>
&lt;!--Style Sheet<br><br>
body {<br>
<x-tab>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</x-tab>background:=
 #FFFFFF;<br>
<x-tab>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</x-tab>color:=
 black;<br>
<x-tab>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</x-tab>font-size:=
 12pt;<br>
<x-tab>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</x-tab>font-family:=
 times new roman;<br>
&nbsp;&nbsp;&nbsp; }<br><br>
.council=
 {<x-tab>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</x-tab>text-decoration:=
 none;<br>
<x-tab>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</x-tab><x-tab>&nbsp;=
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</x-tab>background-color:=
 none;<br>
<x-tab>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</x-tab><x-tab>&nbsp;=
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</x-tab>color: #FFFF80<br>
<x-tab>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</x-tab><x-tab>&nbsp;=
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</x-tab>font-size: 12pt;<br>
<x-tab>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</x-tab><x-tab>&nbsp;=
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</x-tab>font-family: arial;<br>
<x-tab>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</x-tab><x-tab>&nbsp;=
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</x-tab>font-weight: bold;<br>
<x-tab>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</x-tab>&nbsp;&nbsp;&=
nbsp;&nbsp; }<br><br>
a:link<x-tab>&nbsp;&nbsp;</x-tab>{<x-tab>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp=
;&nbsp;</x-tab>text-decoration: none;<br>
<x-tab>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</x-tab><x-tab>&nbsp;=
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</x-tab>color: #3F6DE1;<br>
<x-tab>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</x-tab><x-tab>&nbsp;=
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</x-tab>font-size: 12pt;<br>
<x-tab>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</x-tab><x-tab>&nbsp;=
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</x-tab>font-family: arial;<br>
<x-tab>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</x-tab><x-tab>&nbsp;=
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</x-tab>font-weight: bold;<br>
<x-tab>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</x-tab>}<br>
--&gt;<br><br>
&lt;!--HTML Code<br>
&lt;table&gt;<br>
&lt;tr align=3D&quot;center&quot; bgcolor=3D&quot;#426EFC&quot;=
 width=3D&quot;294&quot;&gt;<br>
&nbsp;&nbsp;&nbsp; &lt;td&gt;&lt;P&gt;&lt;A class=3D&quot;council&quot;=
 Href=3D&quot;mayor.shtml&quot;&gt;Donald E. Esty=
 Jr.&lt;BR&gt;Mayor&lt;/a&gt;&lt;/P&gt;&lt;/td&gt;<br>
&nbsp;&nbsp;&nbsp; &lt;td&gt;&amp;nbsp;&lt;/td&gt;<br>
&lt;/tr&gt;<br><br>
...more table rows etc.<br><br>
--&gt;<br><br>
As you can see I have an &quot;Anchor&quot; in the table, but I don't want=
 it to carry the styles of the normal a:link style, but I want it to be a=
 special style, the style specified in &quot;council&quot;. But this doesn't=
 seem to be working. Is this even possible, and if so, how do I do=
 it?<br><br>
Thanks for any help...<br><br>
Michael Boyer<br>
Technology Support Specialist<br>
City of Westbrook, ME<br>
galdor7(at)hotmail.com<br>
mboyer(at)westbrook.me.us<br><br>
<br><br>
<br><br>
<br>
_________________________________________________________________<br>
MSN Photos is the easiest way to share and print your photos: <a=
 href=3D"http://photos.msn.com/support/worldwide.aspx"=
 eudora=3D"autourl">http://photos.msn.com/support/worldwide.aspx</a><br>
</blockquote></html>

HWG hwg-style mailing list archives, maintained by Webmasters @ IWA