CSS: Apply two a:hover style in single page

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • webster5u
    New Member
    • Jan 2008
    • 28

    CSS: Apply two a:hover style in single page

    Hi, i need apply two different hyperlink:hover style cause by different background color.

    what i do is, i put css external link as

    Code:
    a:hover.paging
    {
    	color: #cc0000; text-decoration: none;
    }
    css style as
    Code:
    <style type="text/css">
    
    	A 		{color: #000099; text-decoration: none; }
    	A:hover {color: #FFFFFF; text-decoration: none; }
    		
    </style>
    HTML code is
    Code:
    <TR>
    <TD>
    <a class="paging" > ....
    </TD>
    <TR>
    It is ignore paging class. who's know what's wrong is it?
  • Dormilich
    Recognized Expert Expert
    • Aug 2008
    • 8694

    #2
    this is cascading. since the inline declaration has precedence over the external file (see CSS cascade) the .paging's declarations are overwritten.

    EDIT: if you have FireBug (Firefox Addon) you can see which styles are applied and which are overwritten in the Style section
    Last edited by Dormilich; Apr 30 '09, 05:50 AM. Reason: added FireBug info

    Comment

    Working...