Multiple hover links in CSS

SpaceshipSpaceship
SpaceshipSpaceship
SpaceshipSpaceship
Watch

loul | uk

Established Member
Impact
0
Hi

I am currently working on a project that uses style sheets. In the main style sheet, a style is defined for 'links'. However further into the project I have added a new set of links to every page that need to have different attributes.

What I need to know is how to create multiple a:hover links in one style sheet because they need to be a different colour to the main set of links sitewide.

Many thanks, anyn help greatly appreciated

Loul | uk
-----------
 
0
Close
The views expressed on this page by users and staff are their own, not those of NamePros.
GoDaddyGoDaddy
Response

Im not sure about this but you could create a different class for each set, such as: a.class1:hover and then <a class="class1" ...>...</a>

Hope that helps...
 
0
Close
Hi

Thanks for the reply...

That sounds right but when I edit the style sheet to add 'a:class' it wont allow it >:(

Could you elaborate with some guidance as this does appear to be the way forward B-)

And by the way, I saw your post regarding if anyone had any work you could get involved in...Where are you from/based. I may have a couple things you could help us out with (out of work projects and stuff)

Let me know, and thanks for your help...
 
0
Close
Im not sure But, I think it's something like this:
you could do as follow:

<a id="idname">What Ever you Want</a>

<style>
#idname:hover{text-decoration:underline;}

I hope this has been useful to you .
 
0
Close
yep...that worked...thanks mate!! :bingo:
 
0
Close
AIVikingsAIVikings

We're social

Escrow.com
Spaceship
Domain Recover
CryptoExchange.com

NamePros updates

Switch between accounts
You can now stay logged in to more than one NamePros account in the same browser. Click your avatar, then "Accounts in this browser", to...
AIVikings
Catchy
  • The sidebar remains visible by scrolling at a speed relative to the page’s height.
Back