Reputation: 55
Why is there an underline after the text in the image below?
<a href="index.html">
<div style="display: inline-block">
<img src="images/fallout.svg">
<h1 class="header_text">Mods</h1>
</div>
</a>
.header_text {
display: inline-block;
font-size: 20px;
color: white;
}
Upvotes: 0
Views: 47
Reputation: 113
EDIT: revised my answer because I didn't understand the question.
to get rid of underlines in hyperlinks, use the following code:
#example {
text-decoration: none;
}
hyperlinks have a text decoration of "underline" by default. You have to specify "none" to get rid of that.
Upvotes: 1