D
D
Deleting Account2019-08-24 12:49:42
Bootstrap
Deleting Account, 2019-08-24 12:49:42

Bootsrap 4. Why does border-bottom go beyond text?

Why does border-bottom go beyond text?
Now:
5d6106af9485a000445041.png
What I need:
5d6106f0b2b3a600755601.png
HTML

<nav class="navbar navbar-expand-lg pl-5 pr-4 fixed-top">
    <a class="navbar-brand" href="#">
      <img src="img/logo.png" alt="">
    </a>
    <button class="navbar-toggler" type="button" data-toggle="collapse" data-target="#navbarNav" aria-controls="navbarNav" aria-expanded="false" aria-label="Toggle navigation">
      <span class="navbar-toggler-icon"></span>
    </button>
    <div class="collapse navbar-collapse d-flex flex-row-reverse bd-highlight" id="navbarNav">
      <ul class="navbar-nav">
        <li class="nav-item p-1 bd-highlight">
          <a class="nav-link active" href="#">Home</a>
        </li>
      </ul>
    </div>
  </nav>

CSS:
header nav ul li a{
  color:white;
  font-size: 18px;
  font-family: 'Ubuntu', sans-serif;
  letter-spacing: 1px;

}
header nav ul li a.active{
  border-bottom: 2px solid white;
}
header nav ul li a:link,header nav ul li a:visited{
  color:white;
}

Answer the question

In order to leave comments, you need to log in

1 answer(s)
M
Mark, 2019-08-24
@Andriy_Kosmenyuk

try margin: 0; padding: 0;

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question