Tycoon Talk
Become a Big fish!
The number 1 forum for online business!
Post topics, ask questions, share your knowledge.
Tycoon Talk is part of Freelancer.com - find skilled workers online at a fraction of the cost.

CSS Forum


You are currently viewing our CSS Forum as a guest. Please register to participate.
Login



Reply
different link styles per div
Old 10-20-2007, 04:48 PM different link styles per div
Average Talker

Posts: 20
Trades: 0
Hello,

Is there anyway i can set for example the hover per div?

e.g. i have a 'menu' div in where i want a green hover, and in my 'content' div i want a blue hover.

Is this possible?

Thanks
koolaid is offline
Reply With Quote
View Public Profile
 
 
Register now for full access!
Old 10-20-2007, 08:45 PM Re: different link styles per div
LadynRed's Avatar
Defies a Status

Posts: 10,016
Location: Tennessee
Trades: 0
Sure..

#content a:hover{
color: blue;
}

#menu a:hover{
color: green;
}
__________________
Web Goddess & Web Standards Evangelist :) - Tables Be Gone !!

Please login or register to view this content. Registration is FREE


Please login or register to view this content. Registration is FREE

LadynRed is offline
Reply With Quote
View Public Profile
 
Old 10-21-2007, 12:33 AM Re: different link styles per div
ADAM Web Design's Avatar
Canadastaninianite

Posts: 5,938
Name: Adam for web page design, not program
Location: Toronto, Ontario, Canada
Trades: 0
* tut *

LNR, you forgot the background-color or background property on BOTH of those examples. That would get you two warnings from the W3C.

And someone FINALLY nailed LNR on a CSS issue! YEAH! YEAH! FO-LEY! FO-LEY! FO-LEY!

(So that makes her right on 999999 issues, half-right on 1.)

I'm just messin' with ya.
__________________

Please login or register to view this content. Registration is FREE
|
Please login or register to view this content. Registration is FREE
(my blog)


Please login or register to view this content. Registration is FREE
(with proof)
ADAM Web Design is offline
Reply With Quote
View Public Profile Visit ADAM Web Design's homepage!
 
Old 10-21-2007, 11:33 AM Re: different link styles per div
LadynRed's Avatar
Defies a Status

Posts: 10,016
Location: Tennessee
Trades: 0
Yes, you get a warning.. but on that one I'm rarely concerned about it. If my background color on the body or wrapper is dark enough to still see my text, I don't bother with it. The warning is one that has been much debated too.

I was, however, being very brief.. and pointing out just the relevant code
__________________
Web Goddess & Web Standards Evangelist :) - Tables Be Gone !!

Please login or register to view this content. Registration is FREE


Please login or register to view this content. Registration is FREE

LadynRed is offline
Reply With Quote
View Public Profile
 
Old 10-21-2007, 01:30 PM Re: different link styles per div
Average Talker

Posts: 20
Trades: 0
Quote:
Originally Posted by LadynRed View Post
Sure..

#content a:hover{
color: blue;
}

#menu a:hover{
color: green;
}
Thanks that does the job well, however if i want to make a:link a:active etc. then i have to do that for each div? Isn't there a way i can set them all like:

#menu a:link a:active a:hover
{
link color: blabla;
active color: yellow;
hover color: green;
}

Ofcourse that doesn't work but you get the point (i hope heh).
koolaid is offline
Reply With Quote
View Public Profile
 
Old 10-21-2007, 07:47 PM Re: different link styles per div
LadynRed's Avatar
Defies a Status

Posts: 10,016
Location: Tennessee
Trades: 0
There are no such selectors as active color or hover color - you can't make up your own.

Yes, you will have to define the css for each div since you want them to be different.
__________________
Web Goddess & Web Standards Evangelist :) - Tables Be Gone !!

Please login or register to view this content. Registration is FREE


Please login or register to view this content. Registration is FREE

LadynRed is offline
Reply With Quote
View Public Profile
 
Reply     « Reply to different link styles per div
 

Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are Off
Pingbacks are Off
Refbacks are Off





   
RSS Feed  Feeds: RSS   JS   XML
RSS Feed  Feeds for this forum: RSS   JS   XML



Page generated in 0.36231 seconds with 12 queries