This question already has answers here:
How to remove underline from a link in HTML?
(8 answers)
Closed 6 years ago.
I was wondering how you would disable to underline on the "a" attribute, for href's. I find it annoying, and I was wondering if there was a bit of code I could add to my .css to change it. Thank you.
A simple google search provides this very easy....
a {
text-decoration: none;
}
simply set a {text-decoration:none}
see in action:
a {
text-decoration: none
}
No Underline
EDIT (I am editing this to whoever downvote it, because that could be the only reason for)
In case you have multiple a's and some of them don't have the attribute href then you can target the href like this:
/*demo */
div {
border: dotted lightblue;
margin: 10px;
font-size:30px
}
a {
display: block;
}
/*in action*/
div:last-of-type a[href] {
text-decoration: none
}
<div>
<a>Without href doesn't make it a link</a>
Link with Underline
</div>
<div>
<a>Without href doesn't make it a link</a>
Link Without Underline
</div>
Related
This question already has answers here:
How to remove the underline for anchors(links)?
(15 answers)
Closed 7 months ago.
how can I remove underline text in my code ?
Use text-decoration : none ; tag in your CSS file or style code .
Give your tag, css property:
text-decoration: none;
Just use in your css
a {
text-decoration: none;
}
try implementing this in your css file or <style> tag
a {
text-decoration: none;
}
This question already has answers here:
Remove blue underline from link
(22 answers)
Closed 1 year ago.
How can i get rid of the underline and the different color because i do not want it to show the hyper link
[1]: https://i.stack.imgur.com/SfcDC.png
You can use the following code.
Put this code in CSS file
a {
text-decoration: none;
color: red;
}
a:hover{
color: black; /* You can use etc. color when user hover on link its change color of text */
}
Click here
You can use the following code to remove the underline from the hyper link.
Use this code in .css file
a:link {
text-decoration: none;
}
or you can use inline css:
Click here
This question already has answers here:
How can I remove the outline around hyperlinks images?
(18 answers)
Closed 5 years ago.
I have a problem. On https://analytium.co.uk/our-cases/ when i click on header see border. It problem only in chrome. Does anyone have any idea why this border appears when clicking?
.myLinkHeading {
outline : none;
}
Just remove the anchor outline.
You have default css coming from bootstrap
a:focus {
outline: 5px auto -webkit-focus-ring-color;
outline-offset: -2px;
}
you should replace by
.works-name a{
outline:none;
}
You can add on you inline css:
<a href="https://analytium.co.uk/cases/sas-and-fraud-prevention-brief-overview/" style="color: #444;outline:none" tabindex="0">
SASĀ® and Fraud Prevention (Brief Overview)
or add on your css file :
a, a:focus {
outline:none;
}
This question already has answers here:
Underlining visited links
(2 answers)
How can I remove the underline of a link in chrome using CSS? [duplicate]
(3 answers)
Closed 8 years ago.
What is the CSS code that I need to write in order to remove the underline from these link after visiting them?
<ul id = "header">
<li> Home </li>
<li>Images</li>
<li>Videos</li>
</ul>
I tried this:
a:visited { text-decoration: none; }
but it didn't work.
Here is a fiddle showing the problem: http://jsfiddle.net/litari/X2Yjk/1/
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;
}
I think you should define the default state as well, so for example:
a:link { text-decoration: underline; }
a:visited { text-decoration: none; }
If existing code is not working for you then please add "!important" in your property.
a:visited
{
text-decoration: none !important;
}
Or try
outline: 0;
It might work on FF.
As mentioned before, changing text-decoration for :visited anchors does not work.
But you could do the following:
a {
border-bottom:1px solid #000;
text-decoration:none;
}
a:visited {
border-bottom-color:rgba(255,255,255,0);
}
This works fine for me: http://jsfiddle.net/Whre/N8c3A/
To test it using chrome inspect the anchor with the developer tools, rightclick the markup and say "Force element state" -> ":visited".
This question already has answers here:
How to remove dotted border around active hyperlinks in IE8 with CSS
(12 answers)
Closed 8 years ago.
I have a link with an <IMG> inside, which directs to a target=_blank, now what I need to do is remove the purple border that comes round the image after I click the link..
I used text-decoration: none; but it still appears ... any ideas? I didn't post the code as none is actually in place except
#portheader a {
text-decoration: none;
border: none;
}
<div id="portheader">
</div>
try adding this to your css
outline: 0;
Give border:none for the image in css
For the Old browsers, use border="0" in the img tag itself.