After exploring a few questions and attempting to use similar ideas, I'm still struggling to get this to work. Could someone lend a hand?
My goal is to create a second level drop-down menu using a provided template that does not have it built-in. However, when I tried the code below, the menu displayed with bullet-pointed links underneath, which looked quite funny. I'm trying to style it correctly with the template but unsure how to achieve this. Here are the codes I've already tried.
Original HTML Code
<body class="homepage">
<header id="header">
<nav class="navbar navbar-inverse" role="banner">
<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="index.html"><i class="fa fa-bolt"></i> SnappySites</a></a> </div>
<div class="collapse navbar-collapse navbar-right">
<ul class="nav navbar-nav">
<li class="active"><a href="index.html">Home</a></li>
<li><a href="about-us.html">About</a></li>
<li><a href="services.html">Services</a></li>
<li><a href="portfolio.html">Portfolio</a></li>
<li><a href="pricing.html">Pricing</a></li>
<li><a href="contact-us.html">Contact</a></li>
</ul>
</div>
</div>
<!--/.container-->
</nav>
<!--/nav-->
</header>
<!--/header-->
Desired HTML Code
<body class="homepage">
<header id="header">
<nav class="navbar navbar-inverse" role="banner">
<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="index.html"><i class="fa fa-bolt"></i> SnappySites</a></a> </div>
<div class="collapse navbar-collapse navbar-right">
<ul class="nav navbar-nav">
<li class="active"><a href="index.html">Home</a></li>
<li><a href="about-us.html">About</a></li>
<li><a href="services.html">Services</a>
<ul>
<li><a>Second level link 1</a></li>
<li><a>Second level link 2</a></li>
</ul>
</li>
<li><a href="portfolio.html">Portfolio</a></li>
<li><a href="pricing.html">Pricing</a></li>
<li><a href="contact-us.html">Contact</a></li>
</ul>
</div>
</div>
<!--/.container-->
</nav>
<!--/nav-->
</header>
<!--/header-->
CSS Code
/*************************
*******Header******
**************************/
.navbar>.container .navbar-brand {
margin-left: 0;
}
.navbar-brand {
padding: 0;
margin: 0;
}
.navbar {
border-radius: 0;
margin-bottom: 0;
background: #151515;
padding: 15px 0;
padding-bottom: 0;
}
.navbar-nav {
margin-top: 12px;
}
.navbar-nav>li {
margin-left: 35px;
padding-bottom: 28px;
}
.navbar-inverse .navbar-nav > li > a {
padding: 5px 12px;
margin: 0;
border-radius: 3px;
color: #fff;
line-height: 24px;
display: inline-block;
}
.navbar-inverse .navbar-nav > li > a:hover {
background-color: #3498db;
color: #fff;
}
.navbar-inverse {
border: none;
}
.navbar-inverse .navbar-brand {
font-size: 30px;
line-height: 50px;
font-weight: 600;
color: #fff;
}
.navbar-inverse .navbar-brand .fa {
color: #3498db;
}
.navbar-inverse .navbar-nav > .active > a, .navbar-inverse .navbar-nav > .active > a:hover, .navbar-inverse .navbar-nav > .active > a:focus, .navbar-inverse .navbar-nav > .open > a, .navbar-inverse .navbar-nav > .open > a:hover, .navbar-inverse .navbar-nav > .open > a:focus {
background-color: #333;
color: #fff;
}
I believe some additional CSS code would be needed such as...
.navbar-nav>ul {
margin-left: 35px;
padding-bottom: 28px;
}
If anyone has any suggestions or tips on achieving this, I would greatly appreciate it! Thank you!