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?
Remove the text decoration for the anchor tag
<a name="Section 1" style="text-decoration : none">Section</a>
To keep the color and prevent an underline on the link:
legend.green-color a{
color:green;
text-decoration: none;
}
legend.green-color{_x000D_
color:green !important;_x000D_
}
_x000D_
You can assign an id to the specific link and add CSS. See the steps below:
1.Add an id of your choice (must be a unique name; can only start with text, not a number):
<a href="/abc/xyz" id="smallLinkButton">def</a>
Then add the necessary CSS as follows:
#smallLinkButton:hover,active,visited{
text-decoration: none;
}
You can use CSS under legend.green-color a:hover
to do it.
legend.green-color a:hover {
color:green;
text-decoration:none;
}
Source: Stackoverflow.com