Question : CSS: Underline in a different color

Using only CSS, is it possible to underline green text with a red line?

Answer : CSS: Underline in a different color

Hi,

One of these should help you out for what you are looking for

a:link {
text-decoration:none;
border-bottom:1px solid black;
}
a:visited {
border-bottom:1px solid grey;
}
a:hover {
border-bottom:1px solid red;
}

Or;

<html
 <head>
  <style>
   a:hover{color:#f00;}
   a{text-decoration:underline;}
   span.link{color:#000;}
  </style>
 </head>
 <body>
  <a href="#"><span class=link>Click Me</span></a>
 </body>
</html>

M@
Random Solutions  
 
programming4us programming4us