Topic: Container within megamenu navbar doesn't take affect in adjusting collapsed width

ggiani pro asked 5 years ago


As you can see in the image below, it does not seem possible to use a container within megamenu to adjust the collapsed width as described for navbars here: https://mdbootstrap.com/components/navbar/#containers.
I used the 1:1 code from https://mdbootstrap.com/components/bootstrap-mega-menu/#v-1 and added a container div within.
<nav class="navbar navbar-expand-lg navbar-dark special-color-dark">
<div class="container">

...

</div>
</nav>

Unfortunally, the width is 100% but should be centered...

Marta Wierzbicka staff answered 5 years ago


Hi, add the .container class before each .row class like here:
<div class="dropdown-menu mega-menu v-2 z-depth-1 special-color py-5 px-3" aria-labelledby="navbarDropdownMenuLink2">
<div class="container">
<div class="row">
<div class="col-md-6 col-xl-3 sub-menu mb-xl-0 mb-4">

...



</div>

</div>

</div>

</div>
Best,
Marta


Please insert min. 20 characters.

FREE CONSULTATION

Hire our experts to build a dedicated project. We'll analyze your business requirements, for free.

Status

Answered

Specification of the issue

  • ForumUser: Pro
  • Premium support: No
  • Technology: MDB jQuery
  • MDB Version: 4.5.10
  • Device: All
  • Browser: All
  • OS: All
  • Provided sample code: Yes
  • Provided link: No