"BS3 Mega Menu"
Bootstrap 3.3.0 Snippet by donatkinson

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
<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>
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
/* 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;
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
1
2
3
4
5
6
7
jQuery(document).ready(function(){
$(".dropdown").hover(
function() { $('.dropdown-menu', this).stop().fadeIn("fast");
},
function() { $('.dropdown-menu', this).stop().fadeOut("fast");
});
});
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX

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 () - 8 years ago - Reply 0