russ - maxdesign wrote:
Start at the beginning. If you want to style every a element on the page,
you can do:
a:link { color: red;}
Not quite true; that will only style anchors which have a href
attribute. If, for some reason you have one without a href (although I
can't think of a good reason
Not quite true; that will only style anchors which have a href
attribute. If, for some reason you have one without a href (although I
can't think of a good reason to have an anchor without a href for which
there isn't a better, more semantic alternative), it *will not* be styled.
Yes,
Hi
Can anyone tell me why when using classes sometimes I can style the a by
itself (e.g. .myclass a) and other times this doesn't work and I have to
style a:link (i.e. .myclass a:link)
Any pointers would be appreciated.
Thanks
Helen
***
Helen Rysavy
a:link is for a href
a is for a mailto or a id or similar.
a:link only applies if there is an href within the a.
On Thu, 16 Dec 2004 12:02:10 +0930, [EMAIL PROTECTED]
[EMAIL PROTECTED] wrote:
Hi
Can anyone tell me why when using classes sometimes I can style the a by
itself (e.g. .myclass
Start at the beginning. If you want to style every a element on the page,
you can do:
a:link { color: red;}
If you want to style a particular link, you can do it using a direct id or
class applied within a link like this:
HTML - a class=foo href=#text/a
CSS - a:link.foo { color: green;}
Or
russ - maxdesign wrote:
If you want to style a particular link, you can do it using a direct id or
class applied within a link like this:
HTML - a class=foo href=#text/a
CSS - a:link.foo { color: green;}
Although the above CSS seems to work, I believe that the more correct
form for this selector
Although the above CSS seems to work, I believe that the more correct
form for this selector is
a.foo:link
Quite correct! Written in a hurry.
My apologies
Russ
**
The discussion list for http://webstandardsgroup.org/
See
This may be too obvious to mention, but one reason why the formatting
of a:link doesn't work might be that it's actually an a:visited and
therefore *supposed* to be a different colour.
The developers' toolbar in FireFox will reset all links for you
(under Miscellaneous) so that you can at