Qbasicnews.com
January 29, 2022, 12:32:11 AM *
Welcome, Guest. Please login or register.

Login with username, password and session length
News: Back to Qbasicnews.com | QB Online Help | FAQ | Chat | All Basic Code | QB Knowledge Base
 
   Home   Help Search Login Register  
Pages: [1]
  Print  
Author Topic: CSS Question  (Read 3026 times)
Zack
*/-\*
*****
Posts: 3974



WWW
« on: June 01, 2003, 12:12:42 AM »

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?
Logged

f only life let you press CTRL-Z.
--------------------------------------
Freebasic is like QB, except it doesn't suck.
Ninkazu
Been there, done that
*****
Posts: 1169



WWW
« Reply #1 on: June 01, 2003, 12:22:21 AM »

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)
Logged

am an asshole. Get used to it.
ak00ma
Ancient Guru
****
Posts: 669



« Reply #2 on: June 01, 2003, 05:00:43 AM »

Yeah, you have to create several classes....one class for this color, and a second class for another color....then you can do this....
Logged

B 4 EVER
pr0gger
I hold this place together
*****
Posts: 775


« Reply #3 on: June 01, 2003, 04:39:28 PM »

*nods* Classes are the way to go, here.
Logged

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]
Ninkazu
Been there, done that
*****
Posts: 1169



WWW
« Reply #4 on: June 01, 2003, 04:45:58 PM »

You can make classes and ids, so you can assign two different behaviors to one tag.
Logged

am an asshole. Get used to it.
Zack
*/-\*
*****
Posts: 3974



WWW
« Reply #5 on: June 02, 2003, 12:25:22 PM »

Thanks, guys. I'll give it a shot when I have time.
Logged

f only life let you press CTRL-Z.
--------------------------------------
Freebasic is like QB, except it doesn't suck.
oracle
*/-\*
*****
Posts: 3652



WWW
« Reply #6 on: June 10, 2003, 03:13:29 AM »

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.
Logged

Pages: [1]
  Print  
 
Jump to:  

Powered by MySQL Powered by PHP Powered by SMF 1.1.21 | SMF © 2015, Simple Machines Valid XHTML 1.0! Valid CSS!