Previous Message
Next Message

Re: [css-d] Simple question about Hover

Sent by Porter Glendinning on 31 January 2003 18:06


At 12:32 PM 1/31/2003, David Buchmueller digitized these thoughts:
>I am building a page and want to use hover only in a specific area - the
>navigation. It worked until it went into this page. I don¹t see why it isn¹t
>working anymore.

You've put the rule sets for visited links after the ones for hovered 
links. This doesn't matter until any of the links are visited. Then, 
for those links, the visited rules take precedence over the hover rules 
where they overlap, since both selectors have the same specificity and 
the visited rules appear later in the style sheet.

Reversing the order of those rule sets should solve the problem. You 
also don't really need all the repetition in the declarations, either:

   a:link {
     color: #0852a5;
     font-size: 10px;
     font-family: Verdana, Arial, Helvetica, sans-serif
   }
   a:visited { color: #666; }
   a:hover { color: #0852a5; background-color: #0852a5; }

   div#sitenav a:link, div#sitenav a:visited { color: #000; }
   div#sitenav a:hover { color: #fff; background-color: #0852a5; }

There was also a typo in your "div#sitenav a:hover" rule set: 
"backgroundcolor" should be "background-color".

- Porter

+--------------------------------------------------------+
| Porter Glendinning      [EMAIL-REMOVED]  |
| Web/UI Commando            http://www.glendinning.org  |
+--------------------------------------------------------+
| Porter's Workshop - http://www.serve.com/apg/workshop/ |
+--------------------------------------------------------+
  
Previous Message
Next Message

Message thread: