molily: Link um mehrere Elemente

Beitrag lesen

Beispiel:

a:link {  
  color: blue;  
  text-decoration: none;  
}  
a:hover {  
  text-decoration: underline;  
}  
  
/* Färbe Blocklinks nicht blau */  
a.blocklink {  
  color: inherit;  
}  
/* Kein Hover-Effekt beim ganzen Link */  
a.blocklink:hover {  
  text-decoration: none;  
}  
  
/* Nutze eine als Link erkennbare besondere Formatierung für die Überschrift */  
a.blocklink h2 {  
  color: navy;  
}  
/* Hover-Effekt bei der Überschrift */  
a.blocklink:hover h2 {  
  text-decoration: underline;  
}
<a href="">Blau</a>  
  
<a href="" class="blocklink">  
  <h2>Nicht blau</h2>  
  <p>Nicht blau</p>  
</a>