CSS getting a:hover to work. (#links a)

Reply

Join Date: Jun 2005
Posts: 104
Reputation: Pim is an unknown quantity at this point 
Solved Threads: 0
Pim Pim is offline Offline
Junior Poster

CSS getting a:hover to work. (#links a)

 
0
  #1
Feb 19th, 2008
I've got the following css:
HTML and CSS Syntax (Toggle Plain Text)
  1. a:hover {background-color:#ff3300};
  2. #links a
  3. {
  4.  
  5. color: #FFFFFF;
  6.  
  7. background-color: #CC00CC;
  8.  
  9. width:6em;
  10.  
  11. heigth:6em;
  12.  
  13. padding:0.2em 1.5em;
  14.  
  15.  
  16.  
  17. }
  18.  
  19. body {background-color: #000000};

The problem is that I want the hover to work, just as what is in #links a. The problem is, it seems, is that they are not compatible with each other; the one I put on top works, the other doesn't. How can I solve this?

Thank You.

(Anohter quick question: what would be a good way to make everything float to the left?)
Reply With Quote Quick reply to this message  
Join Date: Mar 2007
Posts: 1,429
Reputation: Nichito is an unknown quantity at this point 
Solved Threads: 29
Featured Poster
Nichito's Avatar
Nichito Nichito is offline Offline
Nearly a Posting Virtuoso

Re: CSS getting a:hover to work. (#links a)

 
1
  #2
Feb 19th, 2008
well... i think it should work by specifying the a:hover as anither class in the #links id... like this:
  1. #links a
  2. {
  3. code
  4. }
  5.  
  6. #links a:hover
  7. {
  8. code
  9. }
-->sometimes i wanna take my toaster in a bath<--
Reply With Quote Quick reply to this message  
Join Date: Jun 2005
Posts: 104
Reputation: Pim is an unknown quantity at this point 
Solved Threads: 0
Pim Pim is offline Offline
Junior Poster

Re: CSS getting a:hover to work. (#links a)

 
0
  #3
Feb 20th, 2008
It works indeed. Thanks!
Reply With Quote Quick reply to this message  
Reply

This thread is more than three months old.
Perhaps start a new thread instead?
Message:



Similar Threads
Other Threads in the HTML and CSS Forum
Thread Tools Search this Thread



About Us | Contact Us | Advertise | DaniWeb | Acceptable Use Policy | RSS Feed

©2003 - 2009 DaniWeb® LLC