-1

Earlier my bootstrap 4 navbar was perfect and I seem to have messed it up without realising how..

Before all links were spaced evenly across the page, but now they are all pushed to the left. Can anyone else see what I might have changed?

 <nav class="navbar navbar-expand-lg fixed-bottom navbar-dark bg-dark">

        <button class="navbar-toggler" type="button" data-toggle="collapse" data-target="#navbarTogglerDemo03"
            aria-controls="navbarTogglerDemo03" aria-expanded="false" aria-label="Toggle navigation">

            <span class="navbar-toggler-icon"></span>
        </button>


        <div class="collapse navbar-collapse" id="navbarTogglerDemo03">
            <div class="navbar-nav text-center">
                <p></p>
                <a class="nav-item nav-link" href="#">About</a>
                <a class="nav-item nav-link" href="#">Skills</a>
                <a class="nav-item nav-link" href="#">Portfolio</a>
                <a class="nav-item nav-link" href="#">Blog</a>
                <a class="nav-item nav-link" href="#">Contact</a>
                <p></p>
            </div>
        </div>

    </nav>

Thanks

Zerlingg
  • 31
  • 1
  • 6
user10045300
  • 387
  • 1
  • 4
  • 14

2 Answers2

0

In the style for your first nav, add

display: block; margin: 0 auto;

and that should center everything inside of your nav. Hope that helped!

Rojo
  • 2,749
  • 1
  • 13
  • 34
0

solved by putting justify-content-center into the nav class. Didn't have this before though so not sure what changed.

user10045300
  • 387
  • 1
  • 4
  • 14