This is Interesting: Free Magazines for Graphics designers and webmasters  


Home > Archive > Netscape CSS > December 2003 > problems with links





You are viewing an archived Text-only version of the thread. To view this thread in it's original format and/or if you want to reply to this thread please [click here]

Author problems with links
mike randall

2003-12-09, 10:00 am

hello,
i'm very new to css and i'm having a problem controlling the font
color and links in a class that i've created.

what i've done is created a class for a button, so that all the
buttons share the same properties. however, the links for the buttons
are a different color than the links in my document. i've checked the
documentation a bunch of times and the only place that i found where
you can change the link color is in the A{} class. am i wrong??
help!!
Robert E. Boughner

2003-12-09, 10:00 am

mike randall wrote:
quote:

> hello,
> i'm very new to css and i'm having a problem controlling the font
> color and links in a class that i've created.
>
> what i've done is created a class for a button, so that all the
> buttons share the same properties. however, the links for the buttons
> are a different color than the links in my document. i've checked the
> documentation a bunch of times and the only place that i found where
> you can change the link color is in the A{} class. am i wrong??
> help!!



You're partially correct. You can narrow it down like this:

..myButtonClass a:link { ... }

and similarly for a:visited, a:hover, and a:active (incidentally the
order should be link, visited, hover, and active in that order for the
cascade to work properly). With this selector, any links that have a
class of .myButtonClass applied to them will have the rules applied as
you've defined them here. These can be different from links within the
document.

Sponsored Links


Copyright 2003 - 2008 forum4designers.com  Software forum  Computer Hardware reviews