"BS3 Mega Menu"
Bootstrap 3.3.0 Snippet by donatkinson

<link href="//maxcdn.bootstrapcdn.com/bootstrap/3.3.0/css/bootstrap.min.css" rel="stylesheet" id="bootstrap-css"> <script src="//maxcdn.bootstrapcdn.com/bootstrap/3.3.0/js/bootstrap.min.js"></script> <script src="//code.jquery.com/jquery-1.11.1.min.js"></script> <!------ Include the above in your HEAD tag ----------> <div class="container nav-container"> <!-- Static navbar --> <div class="navbar navbar-static-top" role="navigation"> <div class="container"> <div class="navbar-header"> <button type="button" class="navbar-toggle" data-toggle="collapse" data-target=".navbar-collapse"> <span class="sr-only">Toggle navigation</span> <span class="icon-bar"></span> <span class="icon-bar"></span> <span class="icon-bar"></span> </button> <!-- <a class="navbar-brand" href="#">Project name</a>--> </div> <div class="navbar-collapse collapse"> <ul class="nav navbar-nav"> <li class="active"><a href="#">Apply for a home</a></li> <li class="dropdown menu-large"> <a href="#" class="dropdown-toggle" data-toggle="dropdown"> Tenants</a> <ul class="dropdown-menu megamenu row"> <li class="col-sm-3"> <ul> <li><a href="#" class="nav-child">Tenant community</a></li> <li><a href="#">Central West</a></li> <li><a href="#">City & East</a></li> <li><a href="#">Inner West </a></li> <li><a href="#">Canterbury Bankstown</a></li> </ul> </li> <li class="col-sm-3"> <ul> <li><a href="#" class="nav-child">Living in my home</a></li> <li><a href="#">Rent & Payments</a></li> <li><a href="#">Block Meetings</a></li> <li><a href="#">Complaints & Appeals</a></li> <li><a href="#">Neighbour Disputes</a></li> </ul> </li> <li class="col-sm-3"> <ul> <li><a href="#" class="nav-child">Getting involved</a></li> <li><a href="#">Building bridges</a></li> <li><a href="#">TAG</a></li> <li><a href="#">Tenants workshops</a></li> <li><a href="#">Aboriginal working group</a></li> <li><a href="#">Tenant survey</a></li> <li><a href="#">Your views</a></li> <li><a href="#">What’s on</a></li> <li><a href="#">Photos</a></li> <li><a href="#">Stories</a></li> <li><a href="#">Community gardens </a></li> </ul> </li> <li class="col-sm-3"> <ul> <li><a href="#" class="nav-child">I Need Help</a></li> <li><a href="#">Services</a></li> <li><a href="#">Housing team</a></li> <li><a href="#">Jobs</a></li> </ul> </li> </ul> </li> <li><a href="#contact">Repairs</a></li> <li><a href="#contact">Properties</a></li> <li><a href="#contact">About Us</a></li> <li><a href="#contact" class="last">Partnerships</a></li> </ul> <div class="col-sm-2 col-md-2"> <form class="navbar-form" role="search"> <div class="input-group"> <input type="text" class="form-control" placeholder="Search" name="q"> <div class="input-group-btn"> <button class="btn btn-default" type="submit"><i class="glyphicon glyphicon-search"></i></button> </div> </div> </form> </div> <ul class="nav navbar-nav navbar-right hidden-sm hidden-md hidden-lg"> <li><a href=""><i class="fa fa-lock"></i> Tenant login</a></li> </ul> </div><!--/.nav-collapse --> </div> </div> </div>
/* Mega Menu */ .navbar-default{ color: #fff; background-color: #ccc6c6; border-color: #aca1a2; } .navbar-default .navbar-nav > li > a{ color:#fff; } .navbar-default .navbar-nav > .dropdown > a .caret{ border-top-color: #fff; border-bottom-color: #fff; } .navbar-default .navbar-brand{ color:#fff; } .menu-large { position: static !important; } .megamenu{ padding: 20px 0px; width:100%; } .megamenu> li > ul { padding: 0; margin: 0; } .megamenu> li > ul > li { list-style: none; } .megamenu> li > ul > li > a { display: block; padding: 3px 20px; clear: both; font-weight: normal; line-height: 1.428571429; color: #333333; white-space: normal; } .megamenu> li ul > li > a:hover, .megamenu> li ul > li > a:focus { text-decoration: none; color: #262626; background-color: #f5f5f5; } .megamenu.disabled > a, .megamenu.disabled > a:hover, .megamenu.disabled > a:focus { color: #999999; } .megamenu.disabled > a:hover, .megamenu.disabled > a:focus { text-decoration: none; background-color: transparent; background-image: none; filter: progid:DXImageTransform.Microsoft.gradient(enabled = false); cursor: not-allowed; } .megamenu.dropdown-header { color: #428bca; font-size: 18px; } @media (max-width: 768px) { .megamenu{ margin-left: 0 ; margin-right: 0 ; } .megamenu> li { margin-bottom: 30px; } .megamenu> li:last-child { margin-bottom: 0; } .megamenu.dropdown-header { padding: 3px 15px !important; } .navbar-nav .open .dropdown-menu .dropdown-header{ color:#fff; } } /* * Dropdown on hover */ @media (min-width:480px) { .dropdown:hover .dropdown-menu { display: block; } }
jQuery(document).ready(function(){ $(".dropdown").hover( function() { $('.dropdown-menu', this).stop().fadeIn("fast"); }, function() { $('.dropdown-menu', this).stop().fadeOut("fast"); }); });

Related: See More


Questions / Comments:

The HTML, CSS, and JS downloads are pretty useless, as they do not render the Mega Menu as pictured on the BootSnipp demo page [http://bootsnipp.com/snippe...].

For starters, the "HTML" document isn't really. It's missing the start and end <html> and <body> tags, the <head> section, etc. Since there's no <head>, there are also no links to the CSS or JS documents, so one must first build a real HTML document with a <head> that contains links to the CSS and JS.

However, that still isn't enough, because the CSS document is missing 33 styles that are cited in the HTML, namely the following:

home-page
container
nav-container
navbar
navbar-static-top
navbar-header
navbar-toggle
sr-only
icon-bar
navbar-collapse
collapse
active
dropdown-toggle
row
col-sm-3
nav-child
last
col-sm-2
col-md-2
navbar-form
input-group
form-control
input-group-btn
btn
btn-default
glyphicon
glyphicon-search
navbar-right
hidden-sm
hidden-md
hidden-lg
fa
fa-lock

Needless to say, if donatkinson's BS3 Mega Menu is to work properly as shown on the demo page, then the HTML download should include a <head> containing links to the necessary scripts and styles which are currently missing.

As it stands now, I don't see the use in posting a menu solution at all, if the download code is incomplete.

dfnet () - 7 years ago - Reply 0