.mak_menu a, a:link, a:visited { color: #000000; text-decoration: none; } .mak_menu a:hover { color: #FF0000; text-decoration: underline; } .mak_footer a, a:link, a:visited { color: #FFFFFF; text-decoration: none; } .mak_footer a:hover { color: #FF0000; text-decoration: underline; } <table> <tr> <td class="mak_menu"> <div> <a href=''>Ссылка1</a> </div> </td> </tr> <tr> <td class="mak_footer"> <div> <a href=''>Ссылка2</a> </div> </td> </tr> </table> 

Link 1 behaves in the same way as Link2, despite the fact that they have different styles (I invite the amateurs to edit to make the title of the question more literate :))

    1 answer 1

    This selector is:

     .mak_menu a, a:link, a:visited 

    You understand how the three selectors:

     1) .mak_menu a 2) .mak_menu a:link 3) .mak_menu a:visited 

    The browser understands as three separate:

     1) .mak_menu a 2) a:link 3) a:visited 

    Ie the second and third are not working the way you think. To fix the problem, you need to replace the selectors with those shown in the first block. Also, I advise you to read more about css selectors and test knowledge .