S
S
Stacy None2018-07-21 21:40:48
JavaScript
Stacy None, 2018-07-21 21:40:48

How to make an element visible in the bootstrap navbar in the mobile version. Ie disable hiding in the mobile version?

<nav class="navbar navbar-expand-lg navbar-light bg-light">
  <a class="navbar-brand" href="#">Navbar</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="#">Home <span class="sr-only">(current)</span></a>
      </li>
      <li class="nav-item">
        <a class="nav-link" href="#">Features</a>
      </li>
      <li class="nav-item">
        <a class="nav-link" href="#">Pricing</a>
      </li>
      <li class="nav-item">
        <a class="nav-link disabled" href="#">Disabled</a>
      </li>
    </ul>
  </div>
</nav>

Here is the usual bootstrap navbar menu
in the mobile version of the window, all menu items are hidden, but this is not necessary
. How to make sure that one of the items is not hidden in the drop-down menu? and remained the same as in the PC version?
bootstrap version - 4
Thanks in advance!

Answer the question

In order to leave comments, you need to log in

2 answer(s)
A
Anton, 2018-07-21
@hummingbird

Replace navbar-expand-lgwith navbar-expand.
This will expand the navigation for all screen sizes, not just lg.
https://getbootstrap.com/docs/4.1/examples/navbars/

M
msdos-x86, 2018-07-22
@msdos-x86

Well, at least you could read a little documentation

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question