Skip to content

navbar justify-content-start #315

Answered by crftwrk
balrogmedia asked this question in Q&A
Discussion options

You must be logged in to vote

Hello,

take a look to the nav-walker in https://github.com/bootscore/bootscore/blob/main/header.php line 66.

<!-- Bootstrap 5 Nav Walker Main Menu -->
<?php
wp_nav_menu(array(
  'theme_location' => 'main-menu',
  'container' => false,
  'menu_class' => '',
  'fallback_cb' => '__return_false',
  'items_wrap' => '<ul id="bootscore-navbar" class="navbar-nav ms-auto %2$s">%3$s</ul>',
  'depth' => 2,
  'walker' => new bootstrap_5_wp_nav_menu_walker()
));
?>

Navbar has class ms-auto which pushes content to the end. Remove class ms-auto and navbar will have flex-start by default. In your case, replace ms-auto with w-100 justify-content-evenly classes.

Your nav-walker should look like this:

<!-- B…

Replies: 1 comment 1 reply

Comment options

You must be logged in to vote
1 reply
@balrogmedia
Comment options

Answer selected by balrogmedia
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants