Posts: 3,616
Threads: 287
Joined: Jan 2003
If I want to have a different link-hover color for one table and a different link-hover color for another, how would I do that?
For something as simple as text coloring, I'd just specify td.specs {color: #rrggbb}, but I can't nest {}'s, right?
Like, I can't do this:
td.specs {a:hover{color:#rrggbb;};}
Right?
So, is it possible? If so, how?
f only life let you press CTRL-Z.
--------------------------------------
Freebasic is like QB, except it doesn't suck.
Posts: 1,166
Threads: 62
Joined: Apr 2003
I don't think it's possible, but I've never tried it. The thing I'd do is just create another class a.classname:hover and use it (I'm not sure if it's a.cn:hover or a:hover.cn)
am an asshole. Get used to it.
Posts: 594
Threads: 11
Joined: Oct 2002
Yeah, you have to create several classes....one class for this color, and a second class for another color....then you can do this....
B 4 EVER
Posts: 729
Threads: 105
Joined: Feb 2003
*nods* Classes are the way to go, here.
size=9]"To announce that there must be no criticism of the president, or that we are to stand by the president, right or wrong, is not only unpatriotic and servile, but is morally treasonable to the American public." -- Theodore Roosevelt[/size]
Posts: 1,166
Threads: 62
Joined: Apr 2003
You can make classes and ids, so you can assign two different behaviors to one tag.
am an asshole. Get used to it.
Posts: 3,616
Threads: 287
Joined: Jan 2003
Thanks, guys. I'll give it a shot when I have time.
f only life let you press CTRL-Z.
--------------------------------------
Freebasic is like QB, except it doesn't suck.
Posts: 3,343
Threads: 83
Joined: Mar 2003
Humm... I normally stay away from this forum... but with CSS questions, how can I resist?
For two different table hover styles:
table.tab1 a:hover {color: #rrggbb;}
table.tab2 a:hover {color: #rrbbgg;}
So you just have a space between them. This is known as a descendant selector, in the old CSS1 it was known as a contextual selector.