2
I want to put a bar in the menu as example below:
Home | Instructor Course | Legal Advice
For this I am using the code below:
<div class="row">
<nav class="navbar navbar-expand-lg navbar-light">
<a class="navbar-brand" href="#"> </a>
<button class="navbar-toggler" type="button" data-toggle="collapse" data-target="#navbarNav" aria-controls="navbarNav" aria-expanded="false" aria-label="Toggle navigation">
<span class="navbar-toggler-icon"></span>
</button>
<div class="collapse navbar-collapse" id="navbarNav">
<ul class="navbar-nav">
<li class="nav-item active">
<a class="nav-link" href="#">Principal</a>
</li>
<li class="nav-item">
<a class="nav-link" href="#">Curso de Instrutor</a>
</li>
<li class="nav-item">
<a class="nav-link" href="#">Assessoria Jurídica</a>
</li>
</ul>
</div>
</nav>
</div>
And in the CSS:
ul li
{
display: inline;
}
li:before {
content: " | ";
}
li:first-child:before {
content: none;
}
Only it’s getting that way:
How can I fix this?
Olá Leandrade. Actually it would be like this: Home | Instructor Course | Legal Advice
– user24136
But my example is like this, you tested it on whole page??
– LeAndrade
When I visualize your example here, it appears as that hamburger menu and I actually want one next to the other.
– user24136
Guy pushes the button execute and whole page Which is more to the right, otherwise you won’t be able to see the result. Bootstrap automatically recognizes the width here of the site’s test window as mobile, then the menu gets the burger, click on the whole page that the code is doing what you want.
– LeAndrade
You are right Leandrade, I did not pay attention to that detail, I’m sorry for that. It worked! Thank you very much for the help.
– user24136