my drop-down menu is not showing up. It's completely invisible or is just not working. Nothing happens when I hover over the "Store" tab which is where the drop-down should occur. When I remove "visibility: hidden" to see where the drop-down menu actually is, the drop-down items appear as the first two tabs which are "Home" and "About". So in the place of the Home and About tabs, the drop-down menu items appear instead. Any help would be appreciated.
nav {
background-color: #373945;
border-top: 6px solid #ABACAF;
width: 100%;
height: auto;
margin: 0 auto;
display: block;
position: relative;
float: left;
}
nav ul {
list-style: none;
text-align: center;
width: 100%;
max-width: 960px;
margin: 0 auto;
}
nav ul ul {
padding: 0;
position: absolute;
z-index: 9999;
opacity: 0;
visibility: hidden;
transition: all .25s ease-in;
-o-transition: all .25s ease-in;
-ms-transition: all .25s ease-in;
-moz-transition: all .25s ease-in;
-webkit-transition: all .25s ease-in;
}
nav ul li:hover ul {
display: block;
visibility: visible;
opacity: 1;
}
nav ul li {
background-color: #373945;
width: 12.5%;
height: 2em;
border-right: 1px solid #ABACAF;
display: inline-block;
float: left;
/* Internet Explorer 10 */
display: -ms-flexbox;
-ms-flex-pack: center;
-ms-flex-align: center;
/* Firefox */
display: flex;
justify-content: center;
align-items: center;
/* Safari, Opera, and Chrome */
display: -webkit-box;
-webkit-box-pack: center;
-webkit-box-align: center;
/* W3C */
vertical-align: middle;
font-weight: normal;
-webkit-transition: background-color 200ms ease-in-out 0s, color 200ms ease-in-out 0ms;
-moz-transition: background-color 200ms ease-in-out 0s, color 200ms ease-in-out 0ms;
-ms-transition: background-color 200ms ease-in-out 0s, color 200ms ease-in-out 0ms;
-o-transition: background-color 200ms ease-in-out 0s, color 200ms ease-in-out 0ms;
transition: background-color 200ms ease-in-out 0s, color 200ms ease-in-out 0ms;
-webkit-box-sizing: border-box;
-moz-box-sizing: border-box;
box-sizing: border-box;
}
nav ul li:nth-child(1) { border-left: 1px solid #ABACAF; }
nav ul li:hover { background-color: #544D55; color: white; }
nav ul li a {
color: #ABACAF;
text-decoration: none;
}
nav ul li:hover a { color: white; }
nav li ul li {
font-size: 1.3em !important;
text-align: left;
width: 100%;
display: block;
float: left;
}
nav li ul li:nth-of-type(1) {
width: 96%;
padding: 18px 0 20px 4%;
}
nav li ul li:nth-of-type(2) {
width: 96%;
padding: 18px 0 20px 4%;
}
nav li ul li a {
color: black;
font-size: 2em;
border: none;
display: block;
}
/*Style 'show menu' label button and hide it by default*/
.show-menu {
cursor: pointer;
display: none;
}
/*Hide checkbox*/
input[type=checkbox] { display: none; }
/*Show menu when invisible checkbox is checked*/
input[type=checkbox]:checked ~ #menu { display: block; }
<nav>
<label for="show-menu" class="show-menu"><img src="hamburger-red.png" alt="Hamburger Icon" style="position: relative; top: .25em;"></label>
<input type="checkbox" id="show-menu" role="button">
<ul id="menu">
<li>Home</li>
<li>About</li>
<li>Programs</li>
<li>Why Equine</li>
<li>Our Horses</li>
<li>Benefits</li>
<li>Store</li>
<ul class="drop-nav">
<li>Horse Health Store</li>
<li>People Store</li>
</ul>
<li>Contact</li>
</ul>
</nav>
It's not pretty but the dropdown works in the below solution. The issue was the dropdown ul was not nested inside the first-level li.
nav {
background-color: #373945;
border-top: 6px solid #ABACAF;
width: 100%;
height: auto;
margin: 0 auto;
display: block;
position: relative;
float: left;
}
nav ul {
list-style: none;
text-align: center;
width: 100%;
max-width: 960px;
margin: 0 auto;
}
nav ul ul {
padding: 0;
position: absolute;
z-index: 9999;
opacity: 0;
visibility: hidden;
transition: all .25s ease-in;
-o-transition: all .25s ease-in;
-ms-transition: all .25s ease-in;
-moz-transition: all .25s ease-in;
-webkit-transition: all .25s ease-in;
}
nav ul li:hover ul {
display: block;
visibility: visible;
opacity: 1;
}
nav ul li {
background-color: #373945;
width: 12.5%;
height: 2em;
border-right: 1px solid #ABACAF;
display: inline-block;
float: left;
/* Internet Explorer 10 */
display: -ms-flexbox;
-ms-flex-pack: center;
-ms-flex-align: center;
/* Firefox */
display: flex;
justify-content: center;
align-items: center;
/* Safari, Opera, and Chrome */
display: -webkit-box;
-webkit-box-pack: center;
-webkit-box-align: center;
/* W3C */
vertical-align: middle;
font-weight: normal;
-webkit-transition: background-color 200ms ease-in-out 0s, color 200ms ease-in-out 0ms;
-moz-transition: background-color 200ms ease-in-out 0s, color 200ms ease-in-out 0ms;
-ms-transition: background-color 200ms ease-in-out 0s, color 200ms ease-in-out 0ms;
-o-transition: background-color 200ms ease-in-out 0s, color 200ms ease-in-out 0ms;
transition: background-color 200ms ease-in-out 0s, color 200ms ease-in-out 0ms;
-webkit-box-sizing: border-box;
-moz-box-sizing: border-box;
box-sizing: border-box;
}
nav ul li:nth-child(1) { border-left: 1px solid #ABACAF; }
nav ul li:hover { background-color: #544D55; color: white; }
nav ul li a {
color: #ABACAF;
text-decoration: none;
}
nav ul li:hover a { color: white; }
nav li ul li {
font-size: 1.3em !important;
text-align: left;
width: 100%;
display: block;
float: left;
}
nav li ul li:nth-of-type(1) {
width: 96%;
padding: 18px 0 20px 4%;
}
nav li ul li:nth-of-type(2) {
width: 96%;
padding: 18px 0 20px 4%;
}
nav li ul li a {
color: black;
font-size: 2em;
border: none;
display: block;
}
/*Style 'show menu' label button and hide it by default*/
.show-menu {
cursor: pointer;
display: none;
}
/*Hide checkbox*/
input[type=checkbox] { display: none; }
/*Show menu when invisible checkbox is checked*/
input[type=checkbox]:checked ~ #menu { display: block; }
<nav>
<label for="show-menu" class="show-menu"><img src="hamburger-red.png" alt="Hamburger Icon" style="position: relative; top: .25em;"></label>
<input type="checkbox" id="show-menu" role="button">
<ul id="menu">
<li>Home</li>
<li>About</li>
<li>Programs</li>
<li>Why Equine</li>
<li>Our Horses</li>
<li>Benefits</li>
<li>Store
<ul class="drop-nav">
<li>Horse Health Store</li>
<li>People Store</li>
</ul></li>
<li>Contact</li>
</ul>
</nav>
To clarify, all I changed was moved the closing </li> tag to wrap around the dropdown ul.
<li>Store
<ul class="drop-nav">
<li>Horse Health Store</li>
<li>People Store</li>
</ul></li>
use this to your hover div overflow to the outside of the body and change your Store li is over after your hover ul complete
nav {
background-color: #373945;
width: 100%;
height: auto;
margin: 0 auto;
display: block;
position: relative;
float: left;
}
nav ul {
list-style: none;
text-align: center;
width: 100%;
max-width: 960px;
margin: 0 auto;
}
nav ul ul {
padding: 0;
position: absolute;
z-index: 9999;
opacity: 0;
visibility: hidden;
}
nav ul li.show:hover>ul {
display: block;
visibility: visible;
opacity: 1;
width: 100%;
max-width: 200px;
top: 32px;
}
nav ul li {
background-color: #373945;
width: 12.5%;
height: 2em;
border-right: 1px solid #ABACAF;
display: inline-block;
float: left;
display: flex;
justify-content: center;
align-items: center;
box-sizing: border-box;
}
nav ul li:hover {
background-color: #544D55;
color: white;
}
nav ul li a {
color: #ABACAF;
text-decoration: none;
}
nav ul li:hover a {
color: white;
font-size: 16px;
}
nav li ul li {
font-size: 1.3em !important;
text-align: left;
width: 100%;
display: block;
float: left;
padding: 10px;
}
nav li ul li a {
color: black;
font-size: 2em;
border: none;
display: block;
}
<nav>
<ul id="menu">
<li>Home</li>
<li>About</li>
<li>Programs</li>
<li>Why Equine</li>
<li>Our Horses</li>
<li>Benefits</li>
<li class="show">Store
<ul class="drop-nav">
<li>Horse Health Store </li>
<li>People Store</li>
</ul>
</li>
<li>Contact</li>
</ul>
</nav>
Related
I am having a ton of trouble. I am trying to create a drop down menu from 'about' and have not been able to center the menu correctly. It is always right of the menu. I believe it to have to do with the size of 'about'.
How can I fix this?
.nav-main {
position: absolute;
top: 0;
height: 65px;
width: 100%;
text-align: center;
}
.nav-main ul {
position: relative;
margin: 0 auto;
padding: 0;
list-style: none;
font-size: 22px;
line-height: 100%;
font-family: 'Futura W01 Bold', sans-serif;
text-align: center;
text-transform: uppercase;
display: inline-block;
width: 90%;
height: inherit;
}
.nav-top {
position: relative;
margin: 0;
padding: 0 66px 0 50px;
float: none;
display: inline-block;
list-style: none;
height: inherit;
background: transparent url(../images/nav-divide.png) no-repeat right center;
}
.nav-top:first-child {
padding-left: 0;
}
.nav-top:last-child {
background-image: none;
padding-right: 0;
}
.nav-top > a {
position: relative;
display: block;
margin: 0;
color: #6f6f6f;
text-decoration: none;
padding-top: 20px;
padding-bottom: 5px;
-moz-transition: all 0.3s ease;
-ms-transition: all 0.3s ease;
-o-transition: all 0.3s ease;
transition: all 0.3s ease;
}
.nav-top a:hover,
.nav-top.active a {
color: #454545;
border-bottom: 4px solid #00e9d9;
text-decoration: none;
}
.nav-top ul {
display: none;
position: absolute;
}
.nav-top:hover ul {
display: inline;
}
.nav-top li {
float: center;
background-color: #e9e9e9;
}
.nav-top li > a {
position: relative;
display: inline;
margin: 0;
color: #6f6f6f;
text-decoration: none;
padding-top: 20px;
padding-bottom: 5px;
-moz-transition: all 0.3s ease;
-ms-transition: all 0.3s ease;
-o-transition: all 0.3s ease;
transition: all 0.3s ease;
}
<nav class="nav-main" role="navigation">
<ul>
<li class="nav-top">Welcome</li>
<li class="nav-top">About
<ul>
<li>Services</li>
<li>Clients</li>
<li>Press</li>
<li>Leadership</li>
<li>Twitter</li>
</ul>
</li>
<li class="nav-top">Contact</li>
</ul>
<span class="nav-arrow"></span>
</nav>
Andrews:
To solve you problem, you need to indicate the position of your nested list because you are setting it up as "position: absolute" without coordinates.
Add a "left value" to your UL CSS class in order to solve this issue:
.nav-top ul {
display: none;
position: absolute;
left: 0;
}
I'm trying to make a navigation bar for a hobby website to display my photography and other interest's of mine, I'm having slight issues with the position of a drop-down bar I have.
I wanted to know how I would be able to position the drop down menu so when I hover over the music item it would show directly under it. I tried position: relevant, it did work but it shifted all the items to the left of it down to align with the drop down menu.
http://jsfiddle.net/daCrosby/Ly8wuws1/
body{
background-color: #333;
}
nav ul {
list-style: none;
margin: 10px;
padding: 0;
font-family: 'Roboto', sans-serif;
font-weight: bold;
}
nav li {
display: inline-block;
margin: 0 5px;
-webkit-transition: all 0.3s;
-moz-transition: all 0.3s;
-o-transition: all 0.3s;
transition: all 0.3s;
}
nav a {
color: black;
-webkit-transition: all 0.3s;
-moz-transition: all 0.3s;
-o-transition: all 0.3s;
transition: all 0.3s;
}
nav a:hover {
color: #12242d;
}
nav span {
display: block;
color: rgba(255,255,255,0.6);
}
.Inav ul {
list-style: none;
margin-top: 20%;
padding: 0;
text-align: left;
top: 0;
left: 0;
position: fixed;
right: 0;
text-align: center;
font-family: 'Roboto', sans-serif;
font-weight: bold;
}
.Inav nav ul li {
display: inline-block;
margin: 0 5px;
-webkit-transition: all 0.3s;
-moz-transition: all 0.3s;
-o-transition: all 0.3s;
transition: all 0.3s;
}
.Inav nav a {
color: black;
position: block
-webkit-transition: all 0.3s;
-moz-transition: all 0.3s;
-o-transition: all 0.3s;
transition: all 0.3s;
text-decoration: none;
}
.Inav nav a:hover {
color: #12242d;
}
.Inav nav span {
color: rgba(255,255,255,0.6);
}
.Inav ul li:hover ul{
display: block;
margin: 0px;
padding: 0px;
}
.Inav ul li ul{
display: none;
position: absolute;
}
.Inav ul li ul li{
display: block;
}
.Inav ul ul a{
color: white;
}
<div class="Inav">
<nav>
<ul>
<li><span>Home</span></li>
<li><span>FAQ</span></li>
<li><span>Honesty</span></li>
<li><span>Rand2</span></li>
<li><span>Rand3</span></li>
<li><span>Music</span>
<ul>
<li>Kanye</li>
<li>Drake</li>
</ul>
</li>
</ul>
</nav>
</div>
You need to add position: relevant to the parent list items, then add positioning top and left on the sub menu.
nav li {
position: relative;
}
.Inav ul li ul{
position: absolute;
top: 100%; /* modify as necessary */
left: 0px; /* modify as necessary */
}
http://jsfiddle.net/daCrosby/Ly8wuws1/1/
So I added an animation to my navigation bar at repo.itechy21.com and its made the drop down text push to the right side of the drop down when I want it centred. The relevant CSS it attached below (along with HTML)
CSS:
/* Start nav bar*/
#header {
height: 100px;
margin-left: auto;
margin-right: auto;
text-align: center;
}
#content {
margin-left: auto;
margin-right: auto;
padding: 20px;
text-align: center
}
#menu, #menu nav {
margin:0 auto;
padding:0;
position: center;
text-align: center
}
#menu {
display: inline-block;
list-style:none;
background-color: #98bf21;
border-radius: 10px;
text-align: center
}
#menu li {
float: left;
position: relative;
list-style: none;
text-align: center
}
#menu > li:hover > ul {
display:block;
background-color: #98bf21;
border-bottom-right-radius: 10px;
border-bottom-left-radius: 10px;
visibility:visible;
opacity:1;
filter:alpha(opacity=100);
}
#menu > li > ul {
/*animation control*/
visibility: hidden;
opacity: 0;
filter:alpha(opacity=0);
-webkit-transition:.5s ease;
-moz-transition:.5s ease;
-o-transition:.5s ease;
transition:.5s ease;
position: relative;
}
#menu li a {
display: inline-block;
width: 120px;
font-weight: bold;
color: #FFFFFF;
text-align: center;
padding: 4px;
text-decoration: none;
text-transform: uppercase;
/*animation control*/
-o-transition:color .2s ease-out;
-ms-transition:color .2s ease-out;
-moz-transition:color .2s ease-out;
-webkit-transition:color .2s ease-out;
}
#menu li a:hover {
color: black;
-o-transition:color .5s ease-in;
-ms-transition:color .5s ease-in;
-moz-transition:color .5s ease-in;
-webkit-transition:color .5s ease-in;
}
/*End of nav bar css*/
HTML navbar layout (minus links):
<ul id="menu">
<li>Home</li>
<li>Modules
<ul>
<li>Remove Retina</li>
<li>Device Information</li>
<li>Syslogd Fixer</li>
</ul>
</li>
<li>Toolkit</li>
<li>Donate</li>
<li>Blog</li>
</ul>
Any suggestions on how to fix this and get the align back to what it used to be?
I hope this will help.
/* Start nav bar*/
#header {
height: 100px;
margin-left: auto;
margin-right: auto;
text-align: center;
}
#content {
margin-left: auto;
margin-right: auto;
padding: 20px;
text-align: center
}
#menu, #menu nav {
margin:0 auto;
padding:0;
position: center;
text-align: center
}
#menu {
display: inline-block;
list-style:none;
height: auto;
width: auto;
background-color: #98bf21;
border-radius: 10px;
text-align: center;
-webkit-transition:.5s ease;
-moz-transition:.5s ease;
-o-transition:.5s ease;
transition:.5s ease;
}
#menu > li {
float: left;
position: relative;
display: inline-block;
width: 120px;
list-style: none;
text-align: center;
}
#menu ul > li {
display: block;
width: 100%;
list-style: none;
text-align: center;
}
#menu > li:hover > ul {
display:block;
background-color: #98bf21;
border-bottom-right-radius: 10px;
border-bottom-left-radius: 10px;
visibility:visible;
opacity:1;
filter:alpha(opacity=100);
}
#menu > li > ul {
/*animation control*/
display:none;
width: 120px;
height: auto;
margin: 10px 0 0 0;
opacity: 0;
z-index: 10;
filter:alpha(opacity=0);
-webkit-transition:.5s ease;
-moz-transition:.5s ease;
-o-transition:.5s ease;
transition:.5s ease;
}
#menu li a {
font-weight: bold;
color: #FFFFFF;
text-align: center;
padding: 4px;
text-decoration: none;
text-transform: uppercase;
/*animation control*/
-o-transition:color .2s ease-out;
-ms-transition:color .2s ease-out;
-moz-transition:color .2s ease-out;
-webkit-transition:color .2s ease-out;
}
#menu li a:hover {
color: black;
-o-transition:color .5s ease-in;
-ms-transition:color .5s ease-in;
-moz-transition:color .5s ease-in;
-webkit-transition:color .5s ease-in;
}
/*End of nav bar css*/
I'm creating a website, and currently I am having issues with my navigation bar. The issue I am having is with the active link. The background won't fit to the size of the initial button like I want it to. The background is just highlighting the text basically.
<div class="nav">
<ul>
<li>Home</li>
<li><a class="active" href="cage-habitat.html">Cage & Habitat</a>
<ul>
<li>Litter Training</li>
</ul>
</li>
<li>Food & Treats</li>
<li>Dust Bath & Care</li>
<li>Safe Toys</li>
<li>Chinquiry</li>
</ul>
</div>
.nav {
background-color: #526655;
}
.nav a {
color: #fff;
text-decoration: none;
}
.nav ul {
text-align: left;
display: inline;
margin: 0;
padding: 15px 4px 17px 0;
list-style: none;
}
.nav ul li {
color: #fff;
display: inline-block;
margin-right: -4px;
position: relative;
padding: 15px 20px;
background: #526655;
cursor: pointer;
-webkit-transition: all 0.2s;
-moz-transition: all 0.2s;
-ms-transition: all 0.2s;
-o-transition: all 0.2s;
transition: all 0.2s;
}
.nav ul li:hover {
background: #94b399;
color: #fff;
}
/* drop down styles */
.nav ul li ul {
padding: 0;
position: absolute;
top: 42px;
left: 0;
width: 150px;
-webkit-box-shadow: none;
-moz-box-shadow: none;
box-shadow: none;
display: none;
opacity: 0;
visibility: hidden;
-webkit-transiton: opacity 0.2s;
-moz-transition: opacity 0.2s;
-ms-transition: opacity 0.2s;
-o-transition: opacity 0.2s;
-transition: opacity 0.2s;
}
.nav ul li ul li {
background: #94b399;
display: block;
color: #fff;
}
.nav ul li ul li:hover {
background: #94b399;
}
.nav ul li:hover ul {
display: block;
opacity: 1;
visibility: visible;
}
/* end dropdown styles */
.active {
background: #94b399;
}
Any help would be appreciated. https://jsfiddle.net/cweav3r/7j25e8jh/
<ul><li><a href="litter-train-chinchilla.html">Litter
Training</a></li></ul> is taking extra space .
DEMO : http://jsfiddle.net/b89kds70/10/
<div class="nav">
<ul>
<li>Home</li>
<li><a class="active" href="cage-habitat.html">Cage & Habitat</a>
</li>
<li>Food & Treats</li>
<li>Dust Bath & Care</li>
<li>Safe Toys</li>
<li>Chinquiry</li>
</ul>
</div>
.nav {
background-color: #526655;
}
.nav a {
color: #fff;
text-decoration: none;
}
.nav ul {
text-align: left;
display: inline;
margin: 0;
padding: 15px 4px 17px 0;
list-style: none;
position:relative;
}
.nav ul li {
color: #fff;
display: inline-block;
margin-right: -4px;
position: relative;
padding: 15px 20px;
background: #526655;
cursor: pointer;
-webkit-transition: all 0.2s;
-moz-transition: all 0.2s;
-ms-transition: all 0.2s;
-o-transition: all 0.2s;
transition: all 0.2s;
}
.nav ul li:hover {
background: #94b399;
color: #fff;
}
/* drop down styles */
.nav ul li ul {
padding: 0;
position: relative;
top: 42px;
left: 0;
width: 150px;
-webkit-box-shadow: none;
-moz-box-shadow: none;
box-shadow: none;
display: none;
opacity: 0;
visibility: hidden;
-webkit-transiton: opacity 0.2s;
-moz-transition: opacity 0.2s;
-ms-transition: opacity 0.2s;
-o-transition: opacity 0.2s;
-transition: opacity 0.2s;
}
.nav ul li ul li {
background: #94b399;
display: inline;
color: #fff;
}
.nav ul li ul li:hover {
background: #94b399;
}
.nav ul li:hover ul {
position:absolute;
display: block;
opacity: 1;
visibility: visible;
}
/* end dropdown styles */
I am learning css and I have created a vertical menu, hovering the mouse over the first menu item shows the sub-menu across. But my problem is, as soon as I move the mouse to the sub-menu, it disappears. How can I make it so it stays there until I clicked one of the sub-menu items? Please help.
Already searched through a lot of examples but none similar to this. I'm new to css and I'm not sure if my approach is the correct for this menu setup requirement. Please enlighten.
#charset "utf-8";
.navLeft {
width: 25%;
margin-top: 0%;
top: auto;
display: inline;
list-style-type: none;
margin-left: 5%;
position: relative;
z-index: 0;
/* [disabled]clear: none; */
}
.navLeft ul li {
list-style-type: none;
width: 6em;
height: 2em;
/* [disabled]list-style-position: inside; */
color: #F14E23;
text-align: center;
background-color: #FFFFFF;
border: 0.5em solid #000000;
margin-bottom: -0.5em;
font-family: alfa-slab-one;
font-style: normal;
font-weight: 400;
padding-top: 2em;
top: auto;
vertical-align: middle;
padding-bottom: 2em;
-webkit-transition: all 0.1s linear 0s;
-o-transition: all 0.1s linear 0s;
transition: all 0.1s linear 0s;
position: relative;
margin-left: -0.5em;
}
.navLeft ul li:hover {
background-color: #F14E23;
color: #FFFFFF;
list-style-type: none;
position: relative;
}
.navLeft ul .about {
float: left;
-webkit-transition: all .1s linear 0s;
-o-transition: all .1s linear 0s;
transition: all .1s linear 0s;
}
.navLeft ul ul li
{
float: left;
}
.navLeft ul .projects {
clear: left;
}
.navLeft ul ul {
display: none;
}
.navLeft ul .about:hover ~ ul{
display: block;
}
<!doctype html>
<html>
<head>
<meta charset="utf-8">
<title>STORY</title>
<link href="css/styles.css" rel="stylesheet" type="text/css">
</head>
<body>
<section class="mainMid">
<nav class="navLeft">
<ul>
<li class="about">ABOUT</li>
<ul>
<li class="navBeginning">BEGINNING</li>
<li class="navMnv">Mission<br>
<br>
Vision</li>
<li class="navPeople">People</li>
</ul>
<li class="projects">PROJECTS</li>
<li class="getinvolved">GET<br>
INVOLVED</li>
<li class="records">RECORDS</li>
<li class="donate">DONATE</li>
</ul>
</nav>
</section>
</body>
</html>
Refer this fiddle : http://jsfiddle.net/zt8ffu11/
html:
<section class="mainMid">
<nav class="navLeft">
<ul>
<li class="about">ABOUT
<ul>
<li class="navBeginning">BEGINNING</li>
<li class="navMnv">Mission<br>
<br>
Vision</li>
<li class="navPeople">People</li>
</ul>
</li>
<li class="projects">PROJECTS</li>
<li class="getinvolved">GET<br>
INVOLVED</li>
<li class="records">RECORDS</li>
<li class="donate">DONATE</li>
</ul>
</nav>
</section>
css:
.navLeft {
width: 25%;
margin-top: 0%;
top: auto;
display: inline;
list-style-type: none;
margin-left: 5%;
position: relative;
z-index: 0;
/* [disabled]clear: none; */
}
.navLeft ul li {
list-style-type: none;
width: 6em;
height: 2em;
/* [disabled]list-style-position: inside; */
color: #F14E23;
text-align: center;
background-color: #FFFFFF;
border: 0.5em solid #000000;
margin-bottom: -0.5em;
font-family: alfa-slab-one;
font-style: normal;
font-weight: 400;
padding-top: 2em;
top: auto;
vertical-align: middle;
padding-bottom: 2em;
-webkit-transition: all 0.1s linear 0s;
-o-transition: all 0.1s linear 0s;
transition: all 0.1s linear 0s;
position: relative;
margin-left: -0.5em;
}
.navLeft ul li:hover {
background-color: #F14E23;
color: #FFFFFF;
list-style-type: none;
position: relative;
}
.navLeft ul .about {
float: left;
-webkit-transition: all .1s linear 0s;
-o-transition: all .1s linear 0s;
transition: all .1s linear 0s;
}
.navLeft ul ul li
{
float: left;
}
.navLeft ul .projects {
clear: left;
}
.navLeft ul ul {
display: none;
}
.navLeft ul .about:hover ul{
display: block;
}
and for list structure check is question Proper way to make HTML nested list?