How to remove the underline for anchors(links)?
Use CSS. this removes underlines from a
and u
elements:
a, u {
text-decoration: none;
}
Sometimes you need to override other styles for elements, in which case you can use the !important
modifier on your rule:
a {
text-decoration: none !important;
}
Unable to remove underline from an anchor link in HTML/CSS
Underline problem is coming because of below code:
p a {
/*border-bottom: 1px solid #92d4cc;*/
}
I have comment the above code and everything is working as you asked.
check the below snippet for the solution.
let me know if you need any other help.
/*
========================================
Custom styles
========================================
*/
body {
background: #262d47;
color: #888;
font: 300 16px/22px "Raleway", "Open Sans", "Helvetica Neue", Helvetica, Arial, sans-serif;
}
/*
================================
Grid
================================
*/
*,
*:before,
*:after {
-webkit-box-sizing: border-box;
-moz-box-sizing: border-box;
box-sizing: border-box;
}
.container,
.grid {
margin: 0 auto;
width: 1196px;
}
.container {
padding-left: 30px;
padding-right: 30px;
}
.grid,
.col-1-3,
.col-2-3 {
padding-left: 15px;
padding-right: 15px;
}
.col-1-3,
.col-2-3 {
display: inline-block;
vertical-align: top;
}
.col-1-3 {
width: 33.33%;
}
.col-2-3 {
width: 66.66%;
}
/*
========================================
Clearfix
========================================
*/
.group:before,
.group:after {
content: "";
display: table;
}
.group:after {
clear: both;
}
.group {
clear: both;
*zoom: 1;
}
/*
================================
Typography
================================
*/
h1, h3, h4, h5, p {
margin-bottom: 22px;
}
h1, h2, h3, h4 {
color: #92d4cc;
}
h1 {
font-size: 36px;
line-height: 44px;
}
h2 {
font-size: 24px;
line-height: 44px;
}
h3 {
font-size: 21px;
}
h4 {
font-size: 18px;
}
h5 {
color: #a9b2b9;
font-size: 14px;
font-weight: 400;
text-transform: uppercase;
}
strong {
font-weight: 400;
}
cite, em {
font-style: italic;
}
p {
color: #FFF;
}
/*
========================================
Links
========================================
*/
a {
color: #92d4cc;
text-decoration: none;
}
a:hover {
color: #a9b2b9;
}
p a {
/*border-bottom: 1px solid #92d4cc;*/
}
/*
========================================
Buttons
========================================
*/
.btn {
border-radius: 5px;
display: inline-block;
margin: 0;
}
.btn-alt {
border: 1px solid #92d4cc;
padding: 10px 30px;
}
/*
========================================
Primary header
========================================
*/
.logo {
border-top: 4px solid #92d4cc;
float: left;
font-size: 48px;
font-weight: 100;
letter-spacing: .5px;
line-height: 44px;
padding: 40px 0 22px 0;
text-transform: uppercase;
}
.tagline {
margin: 66px 0 22px 0;
text-align: right;
}
.primary-nav {
font-size: 14px;
font-weight: 400;
letter-spacing: .5px;
text-transform: uppercase;
}
/*
========================================
Primary footer
========================================
*/
.primary-footer {
color: #92d4cc;
font-size: 14px;
padding-bottom: 44px;
padding-top: 44px;
}
.primary-footer small {
float: left;
font-weight: 400;
}
/*
========================================
Navigation
========================================
*/
.nav {
text-align: right;
}
/*
========================================
Home
========================================
*/
.hero {
line-height: 44px;
padding: 22px 80px 66px 80px;
text-align: center;
}
.hero h2 {
font-size: 36px;
}
.hero p {
font-size: 24px;
font-weight: 100;
}
.teaser a:hover h3 {
color: #a9b2b9;
}
/*
========================================
About box
========================================
*/
.about {
color: #92d4cc;
text-transform: uppercase;
margin: auto;
font-size: 14px;
}
.marxist {
color: #FFF;
text-decoration: none !important;
}
<section class="teaser col-1-3">
<a href="venue.html">
<h5>Venue</h5>
<h3>The beautiful Theater</h3>
</a>
<p>The beautiful historical theater will be our conference venue.<a class="marxist" href="https://www.marxists.org/archive/marx/works/1848/communist-manifesto/">☭</a></p>
</section>
CSS: how do I remove the underline from a link that isn't directly in the anchor tag?
Your code is trying to remove the underline from the div (which probably doesn't have one) rather than the link (which probably does). Simply
a {
text-decoration: none;
}
will work, although that will remove the underline from all links.
If you need to be more specific to that link then use
<a class="action_link" href="/admin/menu_bars/select">
<div class="action_box right">
Manage Menu Bars
</div>
</a>
a.action_link {
text-decoration: none;
}
This assumes that the underline is in fact a text-decoration
on the link element and not a border-bottom
on the div.
How to Remove Underline from HyperLink?
This should do it:
<a href="http://{website}" style="text-decoration: none;" target="_blank"><span style="font-size:9pt; font-family: Arial, sans-serif;; color:#317a00;; font-weight:bold">{website}</span></a>
more info on styling links in css can be found here: https://www.w3schools.com/css/css_link.asp
Removing underline from specific anchor tag
Probably because another style block has better precedence than your pagerLink
class. Try:
.pagerLink {
background-color: #E4F5F8;
border: 1px solid #C0DEED;
text-decoration: none !important;
}
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;
}
Remove underline on span in anchor tag
You need to add display:inline-block
to span
.link { text-decoration: none;}
.link:hover { text-decoration: underline;}
.link:hover .inside-text{ text-decoration: none; display:inline-block;}
<a href="#" class="link">Hi <span class="inside-text">there</span> dude.</a>
Remove underline only from anchor element child
Try following css,
a:hover i{
display: inline-block; <-- this is the trick
text-decoration:none !important;
}
Demo
Removing underline from A element anchor text
!important
isn't the problem. It's because your selector was .anchor-text a:hover
instead of .anchor-text:hover
Here's a JSFiddle
CSS
a {
text-decoration: none;
}
a:hover {
text-decoration: underline;
}
a.anchor-text {
}
a.anchor-text:hover {
text-decoration: none;
}
HTML
<a href = "">
A Hyperlink (this should underline on hover)
</a>
<a class="anchor-text" name="foo" href="">
Anchor text (this should NOT underline on hover)
</a>
Related Topics
Why Media Queries Has Less Priority Than No Media Queries Css
Calling Wkhtmltopdf to Generate Pdf from Html
How to Draw a Trapezium/Trapezoid with CSS3
How to Make Scrollable Table with Fixed Headers Using CSS
Add a Horizontal Scrollbar to an HTML Table
CSS Float: Floating an Image to the Left of the Text
Link a .CSS File in Another Folder
Elongated Hexagon Shaped Button Using Only One Element
Overflow:Hidden Dots At the End
How to Tell If a Browser Is in "Quirks" Mode
How to Prevent Input Type="Number" Getting Negative Values
Scale Image to Fit a Bounding Box
Css3 Transition Doesn't Work with Display Property
How to Go Up a Level in the Src Path of a Url in HTML
How to Display Vertical Text in Table Headers with Auto Height/Without Text Overflow