Leave submenu in container width

Asked

Viewed 241 times

0

How to leave the submenu (dropdown) within the container width? Where you have the div with the class: class="navbar-Collapse Collapse" I put (position: relative), it worked but the logo link does not work is not clickable.

See the link: http://wsnippets.com/demo/bootstrap-mega-menu/

This is the default script: pasteboard.co/12NtG7PEO.png But I would like it to look like this: pasteboard.co/12QapxzIV.png that the submenu did not have the full width on the screen.

2 answers

0

I’m not sure I understand your question. But from what I saw in your example, what is leaving the container size submenu is the class .megamenu:

 div.navbar-collapse.collapse > ul > li.dropdown.menu-large.open > ul.megamenu 

.megamenu {
    padding: 20px 0px;
    width: 100%;
}
  • This is the standard script: http://pasteboard.co/12NtG7PEO.png But I would like it to look like this: http://pasteboard.co/12QapxzIV.png that the submenu does not have the full width on the screen.

0

Add a container after the <ul class="dropdown-menu megamenu row">

<ul class="dropdown-menu megamenu row">
    <div class="container"> 
        <li class="col-sm-3">
          ...
        </li>
        <li class="col-sm-3">
          ...
        </li>
    </div>
</ul>
  • This is the standard script: http://pasteboard.co/12NtG7PEO.png But I would like it to look like this: http://pasteboard.co/12QapxzIV.png that the submenu does not have the full width on the screen.

Browser other questions tagged

You are not signed in. Login or sign up in order to post.