L
L
LissaAlbatross2019-08-11 13:59:08
Bootstrap
LissaAlbatross, 2019-08-11 13:59:08

Bootsrap how to change navbar height only in expanded state?

<nav class="navbar navbar-expand-lg navbar-dark bg-dark">
  	<button class="navbar-toggler" type="button" data-toggle="collapse" data-target="#navbar1" aria-controls="navbar1" aria-expanded="false" aria-label="Toggle navigation">
    	<span class="navbar-toggler-icon"></span>
  	</button>

  	<div class="collapse navbar-collapse" id="navbar1">
    	<ul class="navbar-nav mr-auto">
      		<li class="nav-item active">
        		<a class="nav-link" href="#">Главная</a>
      		</li>
.....
      	</ul>
  	</div>
</nav>

.navbar{
    height: 40px !important;
}

does not help, since everything is fine in the unfolded position, but the burger does not open for phones.

Answer the question

In order to leave comments, you need to log in

1 answer(s)
W
Warlynn, 2019-08-11
@Warlynn

I'm not sure if I understood you correctly, but try setting the height to another class - .navbar-nav and then apply a media query so that this height is only on mobile devices.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question