Click to See Complete Forum and Search --> : Defining a link / hover style with CSS?


tobyw_1969
05-22-2003, 07:02 AM
I can re-define the a and a:hover style so that my links all behave how I want. But this only works if all the links are supposed to behave the same.

How can I define two different types of link? It might help to explain that I use Dreamweaver - so I am not a HTML expert by any means. I'm not even sure that a:hover is a HTML thing or just DW's way of making it easier for the user.

In DW, it lets me re-define the a:hover style so that I can choose the colour etc.. for when the mouse enters a link. Does anyone know how to make two different link styles in DW, or if not, what code should I add to my <style> section manually, and how do I then call that with a tag?

I hope this makes sense as a question.

pyro
05-22-2003, 08:04 AM
You can find out how to do it here: http://www.w3.org/TR/REC-CSS2/selector.html#link-pseudo-classes But, in a nutshell, define some css like this:

a.mylinks:hover {
color: blue;
font-weight: bold;
}

and then your link like this:

<a href="http://www.w3c.org" class="mylinks">This will be blue and bold on hover</a>

tobyw_1969
05-22-2003, 10:46 AM
You're a damn star! THANKS!!

pyro
05-22-2003, 10:47 AM
lol... :D

You're welcome!