Center a navigation bar

205
0
07-19-2022 03:43 PM
ErichSchreier
New Contributor II

Hi! I am having trouble getting the following code to center a navigation bar in a hub site. The result is that the entire nav bar is justified left so, on large computer screens, the nav bar sits off to the left. The code is borrowed from another hub site our organization runs, and the code works just fine in that site. I have very little experience with html so am wondering if someone can spot something in the code, or may be aware of another way to go about this. Here is a the code, minus links and text:

<nav class="navbar">
<div class="container-fluid">
<div class="navbar-header">
<a class="navbar-brand" href="#" style="text-align: center;"></a>
</div>
<ul class="nav navbar-nav">
<li style="text-display: center;">
</li><li class="inactive"><a href="#" style="text-align: center;"></a></li>
<li><a style="color: #93c350;" href="/"><strong><i class="glyphicon glyphicon-home"><div style="text-align: center;"></div></i></strong></a></li>
<li></li><li style="text-align: center;"><a style="color: #93c350;" "><strong><br></strong></a></li>
<li></li><li style="text-align: center;"><a style="color: #93c350;" href=""><strong><br></strong></a></li>
<li></li><li style="text-align: center;"><a style="color: #93c350;" href=""><strong><br></strong></a></li>
<li></li><li style="text-align: center;"><a style="color: #93c350;" href=""><strong><br></strong></a></li>
<li></li><li style="text-align: center;"><a style="color: #93c350;" href=""><strong><br></strong></a></li>
<li></li><li style="text-align: center;"><a style="color: #93c350;" href=""><strong><br></strong></a></li>
<li></li><li style="text-align: center;"><a style="color: #93c350;" href=""><strong><br></strong></a></li>
</ul>
</div>
</nav>

 

 

 

Thank you!

Tags (2)
0 Kudos
0 Replies