How to remove underline from a name on hover

Joper picture Joper · Aug 25, 2011 · Viewed 205.2k times · Source

I have such html:

<legend class="green-color"><a name="section1">Section</a></legend>

legend.green-color{
    color:green;
}

In my case Section looking green, but when i put mouse pointer on it it became looking like an a href, but i want it stay just the same without underline and changing color.

Is it possible to achieve without changing css or with minimum css cahnge?

or may be somehow with jquery?

Answer

Harry Joy picture Harry Joy · Aug 25, 2011

try this:

legend.green-color a:hover{
    text-decoration: none;
}