Closed ghost closed 8 years ago
House the navbar in a grid.
Thanks for your answer. Can you modify my code below please for my comprehension
<nav class="navbar navbar-default" role="navigation">
<div class="container-fluid">
<!-- Brand and toggle get grouped for better mobile display -->
<div class="navbar-header">
<button type="button" class="navbar-toggle" data-toggle="collapse" data-target="#bs-example-navbar-collapse-1">
<span class="sr-only">Toggle navigation</span>
<span class="icon-bar"></span>
<span class="icon-bar"></span>
<span class="icon-bar"></span>
</button>
<a title="Accueil" class="navbar-brand" href="<?= esc_url(home_url('/')); ?>">
<img src="<?= esc_url(get_template_directory_uri() . '/dist/images/logo.png'); ?>">
</a>
</div>
<?php
wp_nav_menu( array(
'menu' => 'primary_navigation',
'theme_location' => 'primary_navigation',
'depth' => 2,
'container' => 'div',
'container_class' => 'collapse navbar-collapse',
'container_id' => 'bs-example-navbar-collapse-1',
'menu_class' => 'nav navbar-nav',
'fallback_cb' => 'wp_bootstrap_navwalker::fallback',
'walker' => new wp_bootstrap_navwalker())
);
?>
</div>
</nav>
No, I cannot do your work for you.
Check the bootstrap guides for using their grid.
Hello, How to center my navbar and give it an auto width. My navbar has an image as a brand.
I would like :
but centered
Please and thanks in advance.