How can I specify two different link styles in one style sheet? Some links are over a different background color.

John Zukowski

In your stylesheet, just use two define two styles.

a.link {
color: Green;
background-color:transparent;
}

a.link:hover {
color: Red;
background-color:transparent;
text-decoration: underline;
}

a.copy {
color: Yellow;
background-color:transparent;
}

a.copy:hover {
color: Blue;
background-color:transparent;
text-decoration: underline;
}
You can use them like so:
<a class="link" href="link1.html">Link1</a>
<a class="copy" href="link2.html">Link2</a>
0 Comments  (click to add your comment)
Comment and Contribute

 

 

 

 

 


(Maximum characters: 1200). You have 1200 characters left.

 

 

About | Sitemap | Contact