Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

mouse hover, make only the text bold , the underline should be normal

Tags:

html

css

simple html and css.

code:

   <div class="link_my"> <a href="a.php">my link</a></div>

css:

.link_my a:hover{

font-weight:bold;
text-decoration:underline;

}

on mouse hover, the text font becomes bold along with the ubderline. But I want the underline to be normal (not bold).

How to do that ?

like image 232
Istiaque Ahmed Avatar asked Jul 13 '12 13:07

Istiaque Ahmed


1 Answers

This will work for you Istiaque. JS FIDDLE LINK : http://jsfiddle.net/39TtM/

HTML:

<a href="#" class="link">
    <span>
        my link
    </span>
</a>

CSS:

.link span{
    color:blue;
    font-size:30px;
}

.link:hover span{
    font-weight:bold;
}

.link:hover{
    text-decoration:underline;
}
like image 120
AdityaSaxena Avatar answered Sep 28 '22 02:09

AdityaSaxena