Dropdown Menu Not Working? - html

I've searched through this code for errors that would keep it from working, but can't seem to find any. All appears well, except the menu will not dropdown. Does anyone have any tips?
Here is my code as snippet:
ul {
list-style-type: none;
margin: 0;
padding: 0;
overflow: hidden;
background-color: #5BC8C3;
position: fixed;
top: 60px;
width: 100%;
}
li {
float: left;
}
li a,
.dropbtn {
display: inline-block;
color: #f7f7f7;
text-align: center;
padding: 14px 16px;
text-decoration: none;
}
li a:hover,
.dropdown:hover .dropbtn {
background-color: #F7f7f7;
}
li.dropdown {
display: inline-block;
}
.dropdown-content {
display: none;
position: absolute;
background-color: #284A64;
min-width: 160px;
box-shadow: 0px 8px 16px 0px rgba(0, 0, 0, 0.2);
}
.dropdown-content a {
color: #f7f7f7;
padding: 12px 16px;
text-decoration: none;
display: block;
text-align: left;
}
.dropdown-content a:hover {
background-color: #f7f7f7
}
.dropdown:hover .dropdown-content {
display: block;
}
<ul>
<li><a class="active" href="#index">Home</a>
</li>
<li>Catalog
</li>
<li>Calendar
</li>
<li class="dropdown">
Library Information
<div class="dropdown-content">
Children's Programs
Adult Programs
Help Services
Other Services
Library Policies
</div>
</li>
<li>Contact
</li>
</ul>
Thank you for any advice!

Well, the dropdown-menu actually shows up :)
But we cannot see it, because your menu is
overflow: hidden;
If you delete this css-row, your menu will work:
ul {
list-style-type: none;
margin: 0;
padding: 0;
background-color: #5BC8C3;
position: fixed;
top: 60px;
width: 100%;
}
li {
float: left;
}
li a,
.dropbtn {
display: inline-block;
color: #f7f7f7;
text-align: center;
padding: 14px 16px;
text-decoration: none;
}
li a:hover,
.dropdown:hover .dropbtn {
background-color: #F7f7f7;
}
li.dropdown {
display: inline-block;
}
.dropdown-content {
display: none;
position: absolute;
background-color: #284A64;
min-width: 160px;
box-shadow: 0px 8px 16px 0px rgba(0, 0, 0, 0.2);
}
.dropdown-content a {
color: #f7f7f7;
padding: 12px 16px;
text-decoration: none;
display: block;
text-align: left;
}
.dropdown-content a:hover {
background-color: #f7f7f7
}
.dropdown:hover .dropdown-content {
display: block;
}
<ul>
<li><a class="active" href="#index">Home</a>
</li>
<li>Catalog
</li>
<li>Calendar
</li>
<li class="dropdown">
Library Information
<div class="dropdown-content">
Children's Programs
Adult Programs
Help Services
Other Services
Library Policies
</div>
</li>
<li>Contact
</li>
</ul>

ul{
margin:0px;
padding:0px;
list-style:none;
}
ul li{
background-color:#5BC8C3;
width:150px;
height:50px;
float:left;
line-height:50px;
color:#0FC;
text-align:center;
}
ul li a{
color: #FFF;
text-decoration:none;
display:block;
}
ul li a:hover{
background-color:#F7f7f7;
}
<ul>
<li>Home</li>
<li>Catalog</li>
<li>Calender</li>
<li>Library Information
<ul>
<li>Children's Programs</li>
<li>Adult Programs</li>
<li>Help Services</li>
</ul>
</li>
<li>Contact</li>
</ul>

Related

How to change elements in a navbar in html

I made a navigation bar in HTML and trying that the elements of the navigation bar are on the right site. However, the elements are on the right side but in the wrong direction. The direction of the elements is, Kontakt, Über uns, Klimawandel and Home. The direction I will is the reverse of this.
This is the HTML I wrote for the navigation bar:
nav {
list-style-type: none;
margin: 0;
padding: 0;
overflow: hidden;
background-color: #96CB49;
}
li {
float: right;
border-right: 1px solid black;
}
.active {
background-color: #254a01;
}
li:last-child {
border-right: none;
}
li a:hover:not(.active) {
background-color: #254a01;
}
li a,
.dropbtn {
display: inline-block;
color: #F9FCEA;
text-align: center;
padding: 14px 16px;
text-decoration: none;
}
li a:hover,
.dropdown:hover .dropbtn {
background-color: #254a01;
}
li.dropdown {
display: inline-block;
}
.dropdown-content {
display: none;
position: absolute;
background-color: #96CB49;
min-width: 160px;
box-shadow: 0px 8px 16px 0px rgba(0, 0, 0, 0.2);
z-index: 1;
}
.dropdown-content a {
color: #F9FCEA;
padding: 12px 16px;
text-decoration: none;
display: block;
text-align: left;
}
.dropdown-content a:hover {
background-color: #254a01;
}
.dropdown:hover .dropdown-content {
display: block;
}
<nav>
<li><a class="active" href="#home">Home</a></li>
<li class="dropdown">
Klimawandel
<div class="dropdown-content">
Der Klimawandel
Die Ursachen des Klimawandels
Die Auswirkungen des Klimawandels
</div>
</li>
<li>Über uns</li>
<li>Kontakt</li>
<li style="float:left"><a>Logo</a></li>
</nav>
The way to approach this is to make the container float right, and the items inside of it to float left, if you want to use floats for this purpose.
And since you are using float which will cause the element width to depend on its content, you will need to add a wrapper to your <nav> element, that will have the same background color, so that you achieve full width background visually. In my example below, I wrapped the list elements in the <ul>, and made <nav> be the top level container to add the background.
nav {
background-color: #96CB49;
overflow: hidden;
}
ul {
float: right;
list-style-type: none;
margin: 0;
padding: 0;
}
li {
float: left;
border-right: 1px solid black;
}
.active {
background-color: #254a01;
}
li:last-child {
border-right: none;
}
li a:hover:not(.active) {
background-color: #254a01;
}
li a,
.dropbtn {
display: inline-block;
color: #F9FCEA;
text-align: center;
padding: 14px 16px;
text-decoration: none;
}
li a:hover,
.dropdown:hover .dropbtn {
background-color: #254a01;
}
li.dropdown {
display: inline-block;
}
.dropdown-content {
display: none;
position: absolute;
background-color: #96CB49;
min-width: 160px;
box-shadow: 0px 8px 16px 0px rgba(0, 0, 0, 0.2);
z-index: 1;
}
.dropdown-content a {
color: #F9FCEA;
padding: 12px 16px;
text-decoration: none;
display: block;
text-align: left;
}
.dropdown-content a:hover {
background-color: #254a01;
}
.dropdown:hover .dropdown-content {
display: block;
}
<nav>
<ul>
<li><a class="active" href="#home">Home</a></li>
<li class="dropdown">
Klimawandel
<div class="dropdown-content">
Der Klimawandel
Die Ursachen des Klimawandels
Die Auswirkungen des Klimawandels
</div>
</li>
<li>Über uns</li>
<li>Kontakt</li>
<li style="float:left"><a>Logo</a></li>
</ul>
</nav>
However, today there are more effective approaches to doing layout in CSS, such as flex-box which would make your task very easy:
ul {
background: green;
display: flex;
list-style: none;
justify-content: end;
}
<ul>
<li>One</li>
<li>Two</li>
<li>Three</li>
</ul>

How to float search icon to the right

How do i float the font awesome search icon to the right next to sign up.
Here is a screenshot of my nav bar, so you know what i am referring too:
https://imgur.com/rE23FfB
I have search the internet for tutorials and they all say to use float: right; but that seems to not work
body {
margin: 0;
padding: 0;
margin-top: 130px;
overflow-x: hidden;
}
.nav-menu a img {
float: left;
margin-left: 10px;
}
.nav-menu ul {
list-style-type: none;
margin: 0;
padding: 0;
overflow: hidden;
background-color: rgba(0, 0, 0, 0.9);
margin-top: -130px;
}
.nav-menu li {
float: left;
}
.nav-menu li a,
.dropbtn {
display: inline-block;
color: white;
text-align: center;
padding: 14px 16px;
text-decoration: none;
}
.nav-menu li a:hover,
.dropdown:hover .dropbtn {
border-top: 2px solid #ff0000;
}
.nav-menu li.dropdown {
display: inline-block;
}
.nav-menu .dropdown-content {
display: none;
position: absolute;
background-color: #f9f9f9;
min-width: 160px;
box-shadow: 0px 8px 16px 0px rgba(0, 0, 0, 0.2);
z-index: 1;
}
.nav-menu .dropdown-content a {
color: black;
padding: 12px 16px;
text-decoration: none;
display: block;
text-align: left;
}
.nav-menu .dropdown-content a:hover {
background-color: #ff0000;
color: #fff;
}
.nav-menu .dropdown:hover .dropdown-content {
display: block;
}
.nav-menu li.social {
float: right;
}
<div class="nav-menu">
<ul>
<img src="img/logo.jpg" style="width:50px">
<li class="dropdown">
Games
<div class="dropdown-content">
Link 1
Link 2
Link 3
</div>
</li>
<li class="dropdown">
Crews
<div class="dropdown-content">
Link 1
Link 2
Link 3
</div>
</li>
<li>Jobs</li>
<li>Photos</li>
<li>Videos</li>
<li>Events</li>
<li>News</li>
<li class="social">
Sign In
Sign Up
<li><i class="fas fa-search"></i></li>
</ul>
The problem is your <li> wrapping the search icon. This is an invalid code. <li> cannot be a children of an <li>. Change it to just an <a> element
body {
margin: 0;
padding: 0;
margin-top: 130px;
overflow-x: hidden;
}
.nav-menu a img {
float: left;
margin-left: 10px;
}
.nav-menu ul {
list-style-type: none;
margin: 0;
padding: 0;
overflow: hidden;
background-color: rgba(0, 0, 0, 0.9);
margin-top: -130px;
}
.nav-menu li {
float: left;
}
.nav-menu li a,
.dropbtn {
display: inline-block;
color: white;
text-align: center;
padding: 14px 16px;
text-decoration: none;
}
.nav-menu li a:hover,
.dropdown:hover .dropbtn {
border-top: 2px solid #ff0000;
}
.nav-menu li.dropdown {
display: inline-block;
}
.nav-menu .dropdown-content {
display: none;
position: absolute;
background-color: #f9f9f9;
min-width: 160px;
box-shadow: 0px 8px 16px 0px rgba(0, 0, 0, 0.2);
z-index: 1;
}
.nav-menu .dropdown-content a {
color: black;
padding: 12px 16px;
text-decoration: none;
display: block;
text-align: left;
}
.nav-menu .dropdown-content a:hover {
background-color: #ff0000;
color: #fff;
}
.nav-menu .dropdown:hover .dropdown-content {
display: block;
}
.nav-menu li.social {
float: right;
}
<link rel="stylesheet" href="https://use.fontawesome.com/releases/v5.8.1/css/all.css" integrity="sha384-50oBUHEmvpQ+1lW4y57PTFmhCaXp0ML5d60M1M7uH2+nqUivzIebhndOJK28anvf" crossorigin="anonymous">
<div class="nav-menu">
<ul>
<li><img src="img/logo.jpg" style="width:50px"></li>
<li class="dropdown">
Games
<div class="dropdown-content">
Link 1
Link 2
Link 3
</div>
</li>
<li class="dropdown">
Crews
<div class="dropdown-content">
Link 1
Link 2
Link 3
</div>
</li>
<li>Jobs</li>
<li>Photos</li>
<li>Videos</li>
<li>Events</li>
<li>News</li>
<li class="social">
Sign In
Sign Up
<i class="fas fa-search"></i>
</li>
</ul>
</div>
I know I'm a little late to the question - but I have an improved solution (at least I think so)!
The syntax on the previous answer is still a little incorrect. You should also try to make your dropdowns into nested ul's. :-)
By using the display: flex and align-items: center on the .nav-menu, you will be aligning all the elements up without the use of float (which I tend to avoid anyway as it often makes your code behave like you would not expect).
I've also added margin-left:auto for you on your .social container, it will push all your social to the end of the parent.
EDIT:
If you use border-top: transparent on the menu items, this makes sure that the text doesn't move when you add in a coloured border on :hover - so you're essentially just showing the colour.
html,
body {
margin: 0;
padding: 0;
}
.nav-menu {
display: flex;
align-items: center;
background-color: rgba(0, 0, 0, 0.9);
}
.nav-menu img {
margin: 0 10px;
}
.nav-menu>ul {
list-style-type: none;
margin: 0;
padding: 0;
display: flex;
}
ul.social {
margin-left: auto;
}
.nav-menu li a,
.dropbtn {
display: inline-block;
color: white;
text-align: center;
padding: 14px 16px;
text-decoration: none;
border-top: 2px solid transparent;
}
.nav-menu li a:hover,
.dropdown:hover .dropbtn {
border-top: 2px solid #ff0000;
}
.nav-menu li.dropdown {
display: inline-block;
}
.nav-menu .dropdown-content {
display: none;
position: absolute;
background-color: #f9f9f9;
min-width: 160px;
box-shadow: 0px 8px 16px 0px rgba(0, 0, 0, 0.2);
z-index: 1;
list-style: none;
margin: 0;
padding: 0;
}
.nav-menu .dropdown-content a {
color: black;
padding: 12px 16px;
text-decoration: none;
display: block;
text-align: left;
}
.nav-menu .dropdown-content a:hover {
background-color: #ff0000;
color: #fff;
}
.nav-menu .dropdown:hover .dropdown-content {
display: block;
}
<link rel="stylesheet" href="https://use.fontawesome.com/releases/v5.8.1/css/all.css">
<!-- just for the example -->
<div class="nav-menu">
<img src="img/logo.jpg" style="width:50px">
<ul>
<li class="dropdown">
Games
<ul class="dropdown-content">
<li>Link 1</li>
<li>Link 2</li>
<li>Link 3</li>
</ul>
</li>
<li class="dropdown">
Crews
<ul class="dropdown-content">
<li>Link 1</li>
<li>Link 2</li>
<li>Link 3</li>
</ul>
</li>
<li>Jobs</li>
<li>Photos</li>
<li>Videos</li>
<li>Events</li>
<li>News</li>
</ul>
<ul class="social">
<li>Sign In</li>
<li>Sign Up</li>
<li><i class="fas fa-search"></i></li>
</ul>
</div>
You can see the full effect if you view the snippet in full screen.

Reduce width of dropdown menu

I have two pages of code. I want the first page's dropdown menu to look like the second page's dropdown menu. The second page is some code I copied and pasted from W3 Schools.
The problem is on the first page the drop down menu's width is the same as the navigation bar. I want to have a smaller width for the navigation bar and I can't figure out how why it is the same width of navigation bar.
First Page
ul {
margin: 0;
padding: 0;
background-color: green;
overflow: hidden;
list-style-type: none;
}
li {
float: left;
}
li a,
.dropbtn {
display: inline-block;
padding: 50px 100px;
text-decoration: none;
color: white;
}
li a:hover {
color: white;
background-color: #333;
}
.dropdown {
display: inline-block;
}
.dropcont {
display: none;
position: absolute;
background-color: #333 min-width:200px;
z-index: 1;
}
.dropcont a {
color: white;
padding: 12px 16px;
display: block;
text-align: left;
}
.dropdown:hover .dropcont {
display: block;
}
<ul>
<li> Home</li>
<li> Your Home</li>
<li>Home Sales</li>
<li class="dropdown">
Home profile
<div class="dropcont">
Home2
Home3
Home4
</div>
</li>
</ul>
Second Page
ul {
list-style-type: none;
margin: 0;
padding: 0;
overflow: hidden;
background-color: #333;
}
li {
float: left;
}
li a,
.dropbtn {
display: inline-block;
color: white;
text-align: center;
padding: 14px 16px;
text-decoration: none;
}
li a:hover,
.dropdown:hover .dropbtn {
background-color: red;
}
li.dropdown {
display: inline-block;
}
.dropdown-content {
display: none;
position: absolute;
background-color: #f9f9f9;
min-width: 160px;
box-shadow: 0px 8px 16px 0px rgba(0, 0, 0, 0.2);
z-index: 1;
}
.dropdown-content a {
color: black;
padding: 12px 16px;
text-decoration: none;
display: block;
text-align: left;
}
.dropdown-content a:hover {
background-color: #f1f1f1
}
.dropdown:hover .dropdown-content {
display: block;
}
<ul>
<li>Home</li>
<li>News</li>
<li class="dropdown">
Dropdown
<div class="dropdown-content">
Link 1
Link 2
Link 3
</div>
</li>
</ul>
Here is the updated css :
ul {
list-style-type: none;
margin: 0;
padding: 0;
overflow: hidden;
background-color:green;
}
li {
float: left;
}
li a,
.dropbtn {
display: inline-block;
color: white;
text-align: center;
padding: 14px 16px;
text-decoration: none;
}
li a:hover,
.dropdown:hover .dropbtn {
background-color:#333;
}
li.dropdown {
display: inline-block;
}
.dropcont {
display: none;
position: absolute;
background-color: #f9f9f9;
min-width: 160px;
box-shadow: 0px 8px 16px 0px rgba(0, 0, 0, 0.2);
z-index: 1;
}
.dropcont a {
color: black;
padding: 12px 16px;
text-decoration: none;
display: block;
text-align: left;
}
.dropcont a:hover {
background-color: #f1f1f1
}
.dropdown:hover .dropcont {
display: block;
}
<ul>
<li> Home</li>
<li> Your Home</li>
<li>Home Sales</li>
<li class="dropdown">
Home profile
<div class="dropcont">
Home2
Home3
Home4
</div>
</li>
</ul>

Multiple layer Dropdown menu using CSS

I am able to get my dropdown menu to work perfectly, only issue is that i'm having trouble trying to figure out how I can add another dropdown level.
For instance, I want another level to drop down when I hover over Test3. What am I missing in the code to do so?
CSS:
<style>
ul {
list-style-type: none;
margin: 0;
padding: 0;
overflow: hidden;
background-color: #333;
}
li {
float: left;
}
li a, .dropbtn {
display: inline-block;
color: white;
text-align: center;
padding: 14px 16px;
text-decoration: none;
}
li a:hover, .dropdown:hover .dropbtn {
background-color: red;
}
li.dropdown {
display: inline-block;
}
.dropdown-content {
display: none;
position: absolute;
background-color: #f9f9f9;
min-width: 160px;
box-shadow: 0px 8px 16px 0px rgba(0,0,0,0.2);
}
.dropdown-content a {
color: black;
padding: 12px 16px;
text-decoration: none;
display: block;
text-align: left;
}
.dropdown-content a:hover {background-color: #f1f1f1}
.dropdown:hover .dropdown-content {
display: block;
}
</style>
HTML:
<nav>
<ul id="menu">
<li class="dropdown">
Location
<div class="dropdown-content">
Test1
Test2
Test3
</div>
</ul>
</nav>
Maybe you didn't close the li tag? Placing a div inside the li seems to make things complicated.
I think it's easier if you make a new level just wrap everything in a ul-li-ul loop. Like this:
<ul id="menu">
<li>SOMETHING LV1</li>
<li>SOMETHING LV1</li>
<li>DROPDOWN 1
<ul>
<li>SOMETHING LV2</i></li>
<li>DROPDOWN 2</i>
<ul>
<li>SOMETHING LV3</li>
</ul>
</li>
</ul>
</li>
</ul>
Then hide it and show when hover:
#menu li ul{
display: none;
}
#menu li:hover>ul{
display: block;
position: absolute;
width: 100%;
}
So you can have two or three levels, no problem.
Please see the fiddle example: https://jsfiddle.net/fp1x1v05/
Hope this helps.
Sorry, posted an answer before that didn't isolate the links.
What you want to do, ideally, is target hover events on elements that wrap links, then use a bit more specificity in your selectors.
Try this one:
<style>
ul {
list-style-type: none;
margin: 0;
padding: 0;
overflow: hidden;
background-color: #333;
}
li {
float: left;
}
li a, .dropbtn {
display: inline-block;
color: white;
text-align: center;
padding: 14px 16px;
text-decoration: none;
}
li a:hover, .dropdown:hover .dropbtn {
background-color: red;
}
li.dropdown {
display: inline-block;
}
.dropdown-content {
display: none;
position: absolute;
background-color: #f9f9f9;
min-width: 160px;
box-shadow: 0px 8px 16px 0px rgba(0,0,0,0.2);
}
.dropdown-content a {
color: black;
padding: 12px 16px;
text-decoration: none;
display: block;
text-align: left;
}
.dropdown-content a:hover {background-color: #f1f1f1}
.dropdown:hover .dropdown-content {
display: block;
}
.dropdown:hover .dropdown-content ul li {
display: none;
}
.dropdown:hover .dropdown-content li:hover ul li {
display: block;
}
</style>
<nav>
<ul id="menu">
<li class="dropdown">
Location
<ul class="dropdown-content"><li>Test1<ul><li>Subtest 1</li></ul></li>
<li>Test2</li>
<li>Test3</li></ul>
</ul>
</nav>
nav ul
{
list-style: none;
padding: 0;
text-align:center;
}
nav li
{
background-color: rgba(0,100,0,0.5);
position: relative;
display: inline-block;
}
nav li:hover
{
background-color: rgba(100,0,0,0.5)
}
nav a
{
display:block;
padding: 0.5em;
text-decoration: none;
color: rgba(0,0,100,0.9);
}
nav ul ul
{
display: none;
position: absolute;
}
nav li:hover > ul
{
display: block;
}
nav ul ul ul
{
left: 100%;
top: 0;
}
nav > ul > li > ul > li
{
min-width: 100%;
}
<nav>
<ul>
<li>
1.First
<li>
2.Second
<ul>
<li> 2.1
<li> 2.2
<ul>
<li> 2.2.1
<li> 2.2.2
<ul>
<li> 2.2.2.1
<li> 2.2.2.2
</ul>
</ul>
</ul>
<li> 3.Third
</ul>
</nav>

CSS Dropdown Menu with arrow

I am trying to create a drop-down menu that should have 2 levels of dropdown. I want the a menu item (Product), when I hover over its sub-menu(Our Brands) it should come with an arrow and drop-down to side.
Demo :- https://jsfiddle.net/nnefhpxf/
HTML
<div id="navbar-collapse-grid" class="navbar-collapse collapse">
<ul class="nav navbar-nav" id = "drop-nav">
<li><a class="active" href="index.html">Home</a></li>
<li class="dropdown">
Our Company
<div class="dropdown-content">
Company Overview
Management
Manufacturing
Business
</div>
</li>
<li class="dropdown">
Product
<div class="dropdown-content">
Our Brand
<ul>
<li>Intes-o</li>
<li>Frig-M</li>
<li>Rahat</li>
<li>Zesund</li>
<li>Bioti 1gm I.V</li>
<li>Vomiss I.V</li>
</ul>
New Brand Releases
</div>
</li>
<li>Mission</li>
<li>Vision</li>
<li>Contact Us</li>
</ul>
</div>
css
ul {
list-style-type: none;
margin: 0;
padding: 0;
overflow: hidden;
background-color: gray;
font-size: 17px;
}
li {
float: left;
}
li a,
.dropbtn {
display: inline-block;
color: white;
text-align: center;
padding: 14px 16px;
text-decoration: none;
}
li a:hover,
.dropdown:hover .dropbtn {
background-color: #75c5cf;
}
li.dropdown {
display: inline-block;
}
.dropdown-content {
display: none;
position: absolute;
background-color: #f9f9f9;
min-width: 160px;
box-shadow: 0px 8px 16px 0px rgb3a(0, 0, 0, 0.2);
}
.dropdown-content a {
color: black;
padding: 12px 16px;
text-decoration: none;
display: block;
text-align: left;
}
.dropdown-content a:hover {
background-color: #f1f1f1
}
.dropdown:hover .dropdown-content {
display: block;
}
Try this. The hover arrow on the brand item I have uploaded from the local. Please check the below code.
/* css */
ul {
list-style-type: none;
margin: 0;
padding: 0;
overflow: hidden;
background-color: gray;
font-size: 17px;
}
li {
float: left;
}
li a,
.dropbtn {
display: inline-block;
color: white;
text-align: center;
padding: 14px 16px;
text-decoration: none;
}
li a:hover,
.dropdown:hover .dropbtn {
background-color: #75c5cf;
}
li.dropdown {
display: inline-block;
}
.dropdown-content {
display: none;
position: absolute;
background-color: #f9f9f9;
min-width: 160px;
box-shadow: 0px 8px 16px 0px rgba(0, 0, 0, 0.2);
}
.dropdown-content a {
color: black;
padding: 12px 16px;
text-decoration: none;
display: block;
text-align: left;
}
.dropdown-content a:hover {
background-color: #f1f1f1
}
.dropdown:hover .dropdown-content {
display: block;
}
.sub-mnu {
position: absolute;
left: 174px;
top: 0px;
}
.dropdown-content ul {
display: none;
}
.dropdown-content:hover ul {
display: block;
}
.brnd {
background-image: url(https://www.dropbox.com/s/fhjnwgbokn8i8eo/arrow.png);
background-position: right;
background-repeat: no-repeat;
}
<div id="navbar-collapse-grid" class="navbar-collapse collapse">
<ul class="nav navbar-nav" id="drop-nav">
<li><a class="active" href="index.html">Home</a>
</li>
<li class="dropdown">
Our Company
<div class="dropdown-content">
Company Overview
Management
Manufacturing
Business
</div>
</li>
<li class="dropdown">
Product
<div class="dropdown-content">
Our Brand
<ul class="sub-mnu">
<li>Intes-o
</li>
<li>Frig-M
</li>
<li>Rahat
</li>
<li>Zesund
</li>
<li>Bioti 1gm I.V
</li>
<li>Vomiss I.V
</li>
Zesund
</ul>
New Brand Releases
</div>
</li>
<li>Mission
</li>
<li>Vision
</li>
<li>Contact Us
</li>
</ul>
</div>