How to Remove the Underline of a Link in Chrome Using CSS

How can I remove the underline of a link in chrome using CSS?

The only CSS property you can apply on :visited links in most webkit-based browsers (like Chrome) is color. This is to prevent history stealing. Also, you can't determine the value of the color CSS property of links from JavaScript. See https://bugs.webkit.org/show_bug.cgi?id=24300 for details.

You can, however, change the style of all links with a{text-decoration: none;}. Here's a demo of the whole affair.

Remove blue underline from link

You are not applying text-decoration: none; to an anchor (.boxhead a) but to a span element (.boxhead).

Try this:

.boxhead a {
color: #FFFFFF;
text-decoration: none;
}

How can I remove the underline of a linked image in Firefox and Chrome?

Try this

a{text-decoration:none;}
a:hover span{text-decoration:underline;}
<tr>
<th>
<a href="Name" style="display:block;">
<span>Name</span>
<img src="arrow.png" />
</a>
</th>
</tr>

Remove Hyperlink Underlines from Wikipedia Print Preview

Switch Chrome's rendering to print and you'll see they're cheating with border-bottom. You'll need to knock that out too:

/* Remove Hyperlinks */
@media print {
a:link {
border-bottom: none !important;
text-decoration: none !important;
}
a[href]:after {
content: none !important;
}
}

Removing the underline from under a visited link

You can't change text-decoration in :visited

Rather set text-decoration:none on anchors and text-decoration:underline on links you want underlined. For example you can use a class to achieve this.

a
{
text-decoration:none;
}

a.underlined
{
text-decoration:underline;
}

Removing underlining from image link

#img-link, #img-link img{
text-decoration: none !important;
border:0px !important;
outline:none;
border-width: 0px;
outline-width:0px;
border-bottom: none;
}


Related Topics



Leave a reply



Submit