Section legend.green-col...">

How to remove underline on behalf of hover

I have this html:

<legend class="green-color"><a name="section1">Section</a></legend> legend.green-color{ color:green; } 

In my case, Section looks green, but when I hover over it, it looks like href, but I want it to stay the same without underlining or changing colors.

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

or maybe somehow with jquery?

+75
html css
Aug 25 '11 at 10:26
source share
7 answers

try the following:

 legend.green-color a:hover{ text-decoration: none; } 
+138
Aug 25 2018-11-11T00:
source share

Remove the text decor for the anchor tag.

 <a name="Section 1" style="text-decoration : none">Section</a> 
+10
Aug 25 '11 at 10:30
source share

To preserve color and prevent underline links:

 legend.green-color a{ color:green; text-decoration: none; } 
+2
Aug 25 '11 at 10:29
source share

this should do the trick:

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

+2
Aug 25 '11 at 10:29
source share

You can use CSS in legend.green-color a:hover for this.

 legend.green-color a:hover { color:green; text-decoration:none; } 
+2
Aug 25 '11 at 10:30
source share

You can assign an identifier to a specific link and add CSS. See the following steps:

1. Add an identifier of your choice (there must be a unique name, it can start only with text, not a number):

 <a href="/abc/xyz" id="smallLinkButton">def</a> 
  1. Then add the necessary CSS as follows:

     #smallLinkButton:hover,active,visited{ text-decoration: none; } 
0
Feb 03 '17 at 22:56
source share

 legend.green-color{ color:green !important; } 
0
Mar 29 '17 at 10:37
source share



All Articles