Dilip Kumar Yadav
Dilip Kumar Yadav

Reputation: 615

Anchor tag text underline does not come across the page

My HTML code is:

<a href="settings.html">settings</a>

The element does not lies directly under the body tag. Now i have a situation where i need To underline anchor tag text using CSS, to do it i am using the following css code:

 a{ border-bottom: solid 1px #eee;}

However this only underlines the text enclosed in anchor tag. What if want the underline to go across the page?

Upvotes: 0

Views: 2832

Answers (1)

CoderPi
CoderPi

Reputation: 13211

This is what you might want to do:

a {
  border-bottom: solid 1px red;
  display: block;
}
<a href="settings.html">settings</a>

Upvotes: 4

Related Questions