- From: Mustafa <mustafa@tjara.com>
- Date: Wed, 3 Jan 2001 19:12:26 -0500 (EST)
- To: <www-style@w3.org>
- Cc: <halukkaramete@hotmail.com>
- Message-ID: <001401c0757e$587f9820$9de04f3f@TWS3001>
Following code demonstrates the difficulty I am having which is
not being able to define a class so that links *spanned* by that
class follow the corresponding class' specifications.
<style>
/* special anchors */
A.special:link {
COLOR: orange; FONT-FAMILY: Verdana, Arial, Helvetica, sans-serif; FONT-SIZE: 8pt;
}
A.special:visited {
COLOR: magenta; FONT-FAMILY: Verdana, Arial, Helvetica, sans-serif; FONT-SIZE: 8pt;
}
A.special:hover {
COLOR: red;
}
/* default anchors */
A:visited {
COLOR: gray
}
A:hover {
COLOR: blue;
}
A:link {
COLOR: #green;TEXT-DECORATION: none
}
</style>
<html>
<p>
here, for the followong links, there is no class defined around the links.
They are supposed to use the default anchors defined by the style sheet above:
and that's exactly the case. It works.
<p>
<a href="http://www.cnn.com">link in span </a>
<br>
<a href="http://www.cnn.com">link 2</a>
<br>
<a href="http://www.cnn.com">link 3</a>
<br>
<p>
here, I put the same links in a spanned area.
Now all the links are delimited by < span class=special >.
I am thinking that this should overwrite the above defaults.
But it does not. My span is totally ignored. And I don't know why ?
<span class=special>
<p>
<a href="http://www.cnn.com">link in division </a>
<br>
<a href="http://www.cnn.com">link 2</a>
<br>
<a href="http://www.cnn.com">link 3</a>
<br>
</span>
<hr>
<p>Here, I am trying to do same thing with DIV.
That also does not work. I cannot get the links to be effected by the
class special.
<div class=special>
<p>
<a href="http://www.cnn.com">link in division </a>
<br>
<a href="http://www.cnn.com">link 2</a>
<br>
<a href="http://www.cnn.com">link 3</a>
<br>
</div>
<hr>
<p>
I accomplish my goal ( that is effecting my links by the special class )
only when I laboriously type the classes into each anchor one by one.
I think this is an overkill and there must be a cleaner way.
The question is how do you get the same effect without repeting the classses in each anchor !...
<P>
<a class=special href="http://www.cnn.com">link ( inline class defined )</a>
<br>
<a class=special href="http://www.cnn.com">link 2( inline class defined )</a>
<br>
<a class=special href="http://www.cnn.com">link 3( inline class defined )</a>
<br>
Received on Thursday, 4 January 2001 07:53:51 UTC