/    Sign up×
Community /Pin to ProfileBookmark

Defining a link / hover style with CSS?

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.

to post a comment
HTML

3 Comments(s)

Copy linkTweet thisAlerts:
@pyroMay 22.2003 — 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>
Copy linkTweet thisAlerts:
@tobyw_1969authorMay 22.2003 — You're a damn star! THANKS!!
Copy linkTweet thisAlerts:
@pyroMay 22.2003 — lol... ?

You're welcome!
×

Success!

Help @tobyw_1969 spread the word by sharing this article on Twitter...

Tweet This
Sign in
Forgot password?
Sign in with TwitchSign in with GithubCreate Account
about: ({
version: 0.1.9 BETA 5.19,
whats_new: community page,
up_next: more Davinci•003 tasks,
coming_soon: events calendar,
social: @webDeveloperHQ
});

legal: ({
terms: of use,
privacy: policy
});
changelog: (
version: 0.1.9,
notes: added community page

version: 0.1.8,
notes: added Davinci•003

version: 0.1.7,
notes: upvote answers to bounties

version: 0.1.6,
notes: article editor refresh
)...
recent_tips: (
tipper: @AriseFacilitySolutions09,
tipped: article
amount: 1000 SATS,

tipper: @Yussuf4331,
tipped: article
amount: 1000 SATS,

tipper: @darkwebsites540,
tipped: article
amount: 10 SATS,
)...