seems to work fine Try changing the display value of .navbar-nav to inline-block and then applying text-align on its parent to control alignment. If you need to change the mobile view alignment you can re-apply text-align at that breakpoint.
Center Bootstrap Navbar -- do not understand why navigation won't center
By : Uzmaa Malik
Date : March 29 2020, 07:55 AM
I wish this helpful for you There's only two directions of the navigation in Bootstrap, left or right. To center the navbar, there's a couple of methods. This is what I do for one of them. Following this are two example links:
will be helpful for those in need Apply text-align: center to the a tags, or use the .text-center bootstrap helper class to those elements to center the link horizontally. Then to center the menu itself in desktop view, add a media query that applies left: 50%; transform: translateX(-50%); since the menu is absolutely positioned relative to the parent in desktop.