Nick
Nick

Reputation: 55

Why is there href decoration next to my div?

Why is there an underline after the text in the image below?

AOrUb92

<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

Answers (1)

Chris
Chris

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

Related Questions