Saturday, January 30, 2010

How do you remove/force the underline in link anchor <A>?

To remove:

Use CSS. Simply use the following CSS codes:

a {text-decoration:none;}

or directly:

<a href="[link destination]" style="text-decoration:none;">link</a>



To force:

<a href="[link destination]" style="text-decoration:underline;">link</a>

or

<a href="[link destination]"><u>link</u></a>



To show underline only if the mouse is over the top:

CSS method:
a {text-decoration:none;}
a:hover {text-decoration:underline;}



Hope you like these simple ones. Beginners should like these tricks.


2 comments:

  1. Invalid Service Request [[Encountered "text-decoration" at 935770_HTMLBODY[line 13, column 67] Was expecting one of: "," ... ")" ... ... ]]

    ReplyDelete