Skip to content

Instantly share code, notes, and snippets.

@vosidiy
Last active December 8, 2019 17:00
Show Gist options
  • Save vosidiy/0c7fad594615d56585f2a0c35631f576 to your computer and use it in GitHub Desktop.
Save vosidiy/0c7fad594615d56585f2a0c35631f576 to your computer and use it in GitHub Desktop.
Large dropdown-menu
<nav class="navbar navbar-expand-lg navbar-dark bg-primary">
<a class="navbar-brand" href="#">Navbar</a>
<button class="navbar-toggler" type="button" data-toggle="collapse" data-target="#main_nav" aria-expanded="false" aria-label="Toggle navigation">
<span class="navbar-toggler-icon"></span>
</button>
<div class="collapse navbar-collapse" id="main_nav">
<ul class="navbar-nav">
<li class="nav-item active"> <a class="nav-link" href="#">Home </a> </li>
<li class="nav-item"><a class="nav-link" href="#"> About </a></li>
<li class="nav-item"><a class="nav-link" href="#"> Services </a></li>
<li class="nav-item dropdown">
<a class="nav-link dropdown-toggle" href="#" data-toggle="dropdown"> Dropdown large </a>
<div class="dropdown-menu dropdown-large">
The content of large dropdown menu. <br> lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod
tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam,
quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo
consequat.
</div> <!-- dropdown-large.// -->
</li>
</ul>
</div> <!-- navbar-collapse.// -->
</nav>
// Prevent closing from click inside dropdown
$(document).on('click', '.dropdown-menu', function (e) {
e.stopPropagation();
});
.dropdown-large{ padding:20px; }
@media all and (min-width: 992px) {
.dropdown-large{ min-width:500px; }
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment