I do not understand why this happens. In the layout are registered two divas

<div id="enter"> <a href=""> Текст ссылки 1 </a> </div> <div id="reg-button"> <a href=""> Текст ссылки 2 </a> </div> 

There are different styles for links in different divas.

 #enter a:link, a:visited, a:hover, a:active { color: #5e7743; font: 13px Georgia, 'Times New Roman', Times serif; margin-left: 105px; text-align: right; } #reg-button a:link, a:visited, a:hover, a:active { color: #fffcee; font: italic 26px Georgia, 'Times New Roman', Times serif; line-height: 2.5; margin-left: 25px; text-decoration: none; } 

the result is that the link in the div with id = "enter" is displayed in the color that is set for the diva with id = "reg-button" (but remains underlined, and for the link in the reg-button div is set to text-decoration: none; )

Why is this so?

  • one
    Pour some page on the site, pick it up in the firewall and give the answer. So it is difficult to understand the reason. If the description is correct, then this is in the laws of physics. Maybe you have cached there? In general, let's link. - butteff
  • Thank you, the answer to the question has already been given below) - Heidel
  • Mark it then as correct - ghost rider


1 answer 1

What you have prescribed with the help of the a: visited, a: hover etc. - this means a rule for all links on the page.

 #enter a:link, #enter a:visited, #enter a:hover, #enter a:active { // .... } #reg-button a:link, #reg-button a:visited, #reg-button a:hover, #reg-button a:active { / .... } 

In general, enough

 #reg-button a { // ... } 
  • you saved my mind))) - Heidel
  • Plizzzz)) - Deonis