My problem is that the 3rd menu level is not showing up on the website.
- FISMA and HiPAA are not showing up on my menu. they should be under the Audit and Assessment which is also under Services
/* start h_menu */
.h_menu4 {
float: center;
}
.toggleMenu {
display: none;
background: rgba(29, 82, 99, 0.22);
padding: 10px 15px;
width: 100%;
color: #fff;
}
.nav {
list-style: none;
*zoom: 1;
}
.nav:before,
.nav:after {
content: " ";
display: table;
}
.nav:after {
clear: both;
}
.nav ul {
list-style: none;
width: 9em;
}
.nav li a {
display: block;
padding: 10px 20px 40px 20px;
color: #fff;
font-size: 1em;
}
.nav li {
position: relative;
}
.nav li.active a,
.nav li a:hover {
border-bottom: 10px solid #23aae1;
}
.nav > li {
float: left;
}
.nav > li > a.parent {
background: url(../images/plus.png) no-repeat right top 16px;
}
.nav > li > a:hover {
color: #23aae1;
}
.nav li ul {
position: absolute;
left: -9999px;
}
.nav > li.hover > ul {
left: 0px;
}
.nav li li.hover ul {
left: 100%;
top: 0;
-webkit-transition: background .2s linear;
-moz-transition: background .2s linear;
-ms-transition: background .2s linear;
-o-transition: background .2s linear;
transition: background .2s linear;
}
.nav li li a {
font-size: 0.8725em;
padding: 10px;
display: block;
color: #fff;
background: rgba(73, 93, 137, 0.56);
position: relative;
z-index: 9999;
border-top: 1px solid rgba(233, 233, 233, 0.09);
-webkit-transition: all 0.3s ease-out;
-moz-transition: all 0.3s ease-out;
-ms-transition: all 0.3s ease-out;
-o-transition: all 0.3s ease-out;
transition: all 0.3s ease-out;
}
.nav li li li a {
background: #0a2334;
z-index: 200;
border-top: 1px solid #1d7a62;
}
.nav li li a:hover {
background: #041420;
color: #fff;
border-bottom: none;
}
<ul class="nav">
<li>About Us
</li>
<li>Solutions
<ul>
<li>Healthcare IT Solutions
</li>
<li>Government IT Solutions
</li>
</ul>
</li>
<li>Services
<ul>
<li>Risk Management
</li>
<ul>
<li>Cyber Risk & Security Controls Assessment
</li>
<li>CyberSprint Advisory
</li>
</ul>
<li>Audit & Assessment
</li>
<ul>
<li>FISMA
</li>
<li>HIPAA
</li>
</ul>
<li>Disaster Recovery & Business Continuity Planning
</li>
</ul>
</li>
<li>Contact
</li>
</ul>
sorry guys I'm quite new at this and not really used into deep coding. Every help would be much appreciated.
The problem was that <li>Risk Management</li> had to wrap submenu <ul> ... </ul>.
/* start h_menu */
.h_menu4 {
float: center;
}
.toggleMenu {
display: none;
background: rgba(29, 82, 99, 0.22);
padding: 10px 15px;
width: 100%;
color: #fff;
}
.nav {
list-style: none;
*zoom: 1;
}
.nav:before,
.nav:after {
content: " ";
display: table;
}
.nav:after {
clear: both;
}
.nav ul {
list-style: none;
width: 9em;
padding: 0;
}
.nav li a {
display: block;
padding: 10px 20px 40px 20px;
color: #000000;
font-size: 1em;
}
.nav li {
position: relative;
}
.nav li.active a,
.nav > li:hover > a {
border-bottom: 10px solid #23aae1;
}
.nav > li {
float: left;
}
.nav > li > a.parent {
background: url(../images/plus.png) no-repeat right top 16px;
}
.nav > li:hover > a {
color: #23aae1;
}
.nav li ul {
position: absolute;
left: -9999px;
}
.nav > li:hover > ul {
left: 0px;
}
.nav li li:hover ul {
left: 100%;
top: 0;
-webkit-transition: background .2s linear;
-moz-transition: background .2s linear;
-ms-transition: background .2s linear;
-o-transition: background .2s linear;
transition: background .2s linear;
}
.nav li li a {
font-size: 0.8725em;
padding: 10px;
display: block;
color: #fff;
background: rgba(73, 93, 137, 0.56);
position: relative;
z-index: 9999;
border-top: 1px solid rgba(233, 233, 233, 0.09);
-webkit-transition: all 0.3s ease-out;
-moz-transition: all 0.3s ease-out;
-ms-transition: all 0.3s ease-out;
-o-transition: all 0.3s ease-out;
transition: all 0.3s ease-out;
}
.nav li li li a {
background: #0a2334;
z-index: 200;
border-top: 1px solid #1d7a62;
}
.nav li li a:hover {
background: #041420;
color: #fff;
border-bottom: none;
}
<ul class="nav">
<li>About Us
</li>
<li>Solutions
<ul>
<li>Healthcare IT Solutions
</li>
<li>Government IT Solutions
</li>
</ul>
</li>
<li>Services
<ul>
<li>Risk Management
<ul>
<li>Cyber Risk & Security Controls Assessment
</li>
<li>CyberSprint Advisory
</li>
</ul>
</li>
<li>Audit & Assessment
</li>
<ul>
<li>FISMA
</li>
<li>HIPAA
</li>
</ul>
<li>Disaster Recovery & Business Continuity Planning
</li>
</ul>
</li>
<li>Contact
</li>
</ul>
Related
How can I center align menu, I tried to changes properties for div, ul and li which didn't work: http://codepen.io/anon/pen/dGqdYq
<div id='cssmenu'>
<ul>
<li><a href='#'>Home</a></li>
<li class='active has-sub'><a href='#'>Products</a>
<ul>
<li class='has-sub'><a href='#'>Product 1</a>
<ul>
<li><a href='#'>Sub Product</a></li>
<li><a href='#'>Sub Product</a></li>
</ul>
</li>
<li class='has-sub'><a href='#'>Product 2</a>
<ul>
<li><a href='#'>Sub Product</a></li>
<li><a href='#'>Sub Product</a></li>
</ul>
</li>
</ul>
</li>
<li><a href='#'>About</a></li>
<li><a href='#'>Contact</a></li>
</ul>
</div>
use style in may help you
#cssmenu > ul > li
{
float:none;
display:inline-block;
}
#cssmenu
{
margin: 0px auto;
text-align: center;
}
do this
#import url(http://fonts.googleapis.com/css?family=Open+Sans);
#cssmenu,
#cssmenu ul,
#cssmenu ul li,
#cssmenu ul li a,
#cssmenu #menu-button {
margin: 0;
padding: 0;
border: 0;
list-style: none;
line-height: 1;
display: block;
position: relative;
-webkit-box-sizing: border-box;
-moz-box-sizing: border-box;
box-sizing: border-box;
}
#cssmenu:after,
#cssmenu > ul:after {
content: ".";
display: block;
clear: both;
visibility: hidden;
line-height: 0;
height: 0;
}
#cssmenu #menu-button {
display: none;
}
#cssmenu {
width: 400px;
font-family: 'Open Sans', sans-serif;
line-height: 1;
background: #ffffff;
margin: auto;
}
#menu-line {
position: absolute;
top: 0;
left: 0;
height: 3px;
background: #009ae1;
-webkit-transition: all 0.25s ease-out;
-moz-transition: all 0.25s ease-out;
-ms-transition: all 0.25s ease-out;
-o-transition: all 0.25s ease-out;
transition: all 0.25s ease-out;
}
#cssmenu > ul > li {
float: left;
}
#cssmenu.align-center > ul {
font-size: 0;
text-align: center;
}
#cssmenu.align-center > ul > li {
display: inline-block;
float: none;
}
#cssmenu.align-center ul ul {
text-align: left;
}
#cssmenu.align-right > ul > li {
float: right;
}
#cssmenu.align-right ul ul {
text-align: right;
}
#cssmenu > ul > li > a {
padding: 20px;
font-size: 12px;
text-decoration: none;
text-transform: uppercase;
color: #000000;
-webkit-transition: color .2s ease;
-moz-transition: color .2s ease;
-ms-transition: color .2s ease;
-o-transition: color .2s ease;
transition: color .2s ease;
}
#cssmenu > ul > li:hover > a,
#cssmenu > ul > li.active > a {
color: #009ae1;
}
#cssmenu > ul > li.has-sub > a {
padding-right: 25px;
}
#cssmenu > ul > li.has-sub > a::after {
position: absolute;
top: 21px;
right: 10px;
width: 4px;
height: 4px;
border-bottom: 1px solid #000000;
border-right: 1px solid #000000;
content: "";
-webkit-transform: rotate(45deg);
-moz-transform: rotate(45deg);
-ms-transform: rotate(45deg);
-o-transform: rotate(45deg);
transform: rotate(45deg);
-webkit-transition: border-color 0.2s ease;
-moz-transition: border-color 0.2s ease;
-ms-transition: border-color 0.2s ease;
-o-transition: border-color 0.2s ease;
transition: border-color 0.2s ease;
}
#cssmenu > ul > li.has-sub:hover > a::after {
border-color: #009ae1;
}
#cssmenu ul ul {
position: absolute;
left: -9999px;
}
#cssmenu li:hover > ul {
left: auto;
}
#cssmenu.align-right li:hover > ul {
right: 0;
}
#cssmenu ul ul ul {
margin-left: 100%;
top: 0;
}
#cssmenu.align-right ul ul ul {
margin-left: 0;
margin-right: 100%;
}
#cssmenu ul ul li {
height: 0;
-webkit-transition: height .2s ease;
-moz-transition: height .2s ease;
-ms-transition: height .2s ease;
-o-transition: height .2s ease;
transition: height .2s ease;
}
#cssmenu ul li:hover > ul > li {
height: 32px;
}
#cssmenu ul ul li a {
padding: 10px 20px;
width: 160px;
font-size: 12px;
background: #333333;
text-decoration: none;
color: #dddddd;
-webkit-transition: color .2s ease;
-moz-transition: color .2s ease;
-ms-transition: color .2s ease;
-o-transition: color .2s ease;
transition: color .2s ease;
}
#cssmenu ul ul li:hover > a,
#cssmenu ul ul li a:hover {
color: #ffffff;
}
#cssmenu ul ul li.has-sub > a::after {
position: absolute;
top: 13px;
right: 10px;
width: 4px;
height: 4px;
border-bottom: 1px solid #dddddd;
border-right: 1px solid #dddddd;
content: "";
-webkit-transform: rotate(-45deg);
-moz-transform: rotate(-45deg);
-ms-transform: rotate(-45deg);
-o-transform: rotate(-45deg);
transform: rotate(-45deg);
-webkit-transition: border-color 0.2s ease;
-moz-transition: border-color 0.2s ease;
-ms-transition: border-color 0.2s ease;
-o-transition: border-color 0.2s ease;
transition: border-color 0.2s ease;
}
#cssmenu.align-right ul ul li.has-sub > a::after {
right: auto;
left: 10px;
border-bottom: 0;
border-right: 0;
border-top: 1px solid #dddddd;
border-left: 1px solid #dddddd;
}
#cssmenu ul ul li.has-sub:hover > a::after {
border-color: #ffffff;
}
#media all and (max-width: 768px), only screen and (-webkit-min-device-pixel-ratio: 2) and (max-width: 1024px), only screen and (min--moz-device-pixel-ratio: 2) and (max-width: 1024px), only screen and (-o-min-device-pixel-ratio: 2/1) and (max-width: 1024px), only screen and (min-device-pixel-ratio: 2) and (max-width: 1024px), only screen and (min-resolution: 192dpi) and (max-width: 1024px), only screen and (min-resolution: 2dppx) and (max-width: 1024px) {
#cssmenu {
width: 100%;
}
#cssmenu ul {
width: 100%;
display: none;
}
#cssmenu.align-center > ul,
#cssmenu.align-right ul ul {
text-align: left;
}
#cssmenu ul li,
#cssmenu ul ul li,
#cssmenu ul li:hover > ul > li {
width: 100%;
height: auto;
border-top: 1px solid rgba(120, 120, 120, 0.15);
}
#cssmenu ul li a,
#cssmenu ul ul li a {
width: 100%;
}
#cssmenu > ul > li,
#cssmenu.align-center > ul > li,
#cssmenu.align-right > ul > li {
float: none;
display: block;
}
#cssmenu ul ul li a {
padding: 20px 20px 20px 30px;
font-size: 12px;
color: #000000;
background: none;
}
#cssmenu ul ul li:hover > a,
#cssmenu ul ul li a:hover {
color: #000000;
}
#cssmenu ul ul ul li a {
padding-left: 40px;
}
#cssmenu ul ul,
#cssmenu ul ul ul {
position: relative;
left: 0;
right: auto;
width: 100%;
margin: 0;
}
#cssmenu > ul > li.has-sub > a::after,
#cssmenu ul ul li.has-sub > a::after {
display: none;
}
#menu-line {
display: none;
}
#cssmenu #menu-button {
display: block;
padding: 20px;
color: #000000;
cursor: pointer;
font-size: 12px;
text-transform: uppercase;
}
#cssmenu #menu-button::after {
content: '';
position: absolute;
top: 20px;
right: 20px;
display: block;
width: 15px;
height: 2px;
background: #000000;
}
#cssmenu #menu-button::before {
content: '';
position: absolute;
top: 25px;
right: 20px;
display: block;
width: 15px;
height: 3px;
border-top: 2px solid #000000;
border-bottom: 2px solid #000000;
}
#cssmenu .submenu-button {
position: absolute;
z-index: 10;
right: 0;
top: 0;
display: block;
border-left: 1px solid rgba(120, 120, 120, 0.15);
height: 52px;
width: 52px;
cursor: pointer;
}
#cssmenu .submenu-button::after {
content: '';
position: absolute;
top: 21px;
left: 26px;
display: block;
width: 1px;
height: 11px;
background: #000000;
z-index: 99;
}
#cssmenu .submenu-button::before {
content: '';
position: absolute;
left: 21px;
top: 26px;
display: block;
width: 11px;
height: 1px;
background: #000000;
z-index: 99;
}
#cssmenu .submenu-button.submenu-opened:after {
display: none;
}
}
<!doctype html>
<html lang=''>
<head>
<meta charset='utf-8'>
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1">
<link rel="stylesheet" href="styles.css">
<title>CSS MenuMaker</title>
</head>
<body>
<div id='cssmenu'>
<ul>
<li><a href='#'>Home</a></li>
<li class='active has-sub'><a href='#'>Products</a>
<ul>
<li class='has-sub'><a href='#'>Product 1</a>
<ul>
<li><a href='#'>Sub Product</a></li>
<li><a href='#'>Sub Product</a></li>
</ul>
</li>
<li class='has-sub'><a href='#'>Product 2</a>
<ul>
<li><a href='#'>Sub Product</a></li>
<li><a href='#'>Sub Product</a></li>
</ul>
</li>
</ul>
</li>
<li><a href='#'>About</a></li>
<li><a href='#'>Contact</a></li>
</ul>
</div>
</body>
<html>
I would use flexbox, this way you don't need a set width on the menu...
#cssmenu {
display: flex;
justify-content: center;
}
I'm trying to get my sub-menu to align left. The team names are spilling over. Either it needs aligned left or I need to widen the sub-menu. I think I am just over-looking what needs to be done, but I just can't figure it out.
nav {
background-color: #000;
border: 1px solid #000;
border-radius: 4px;
box-shadow: 0 2px 2px -1px rgba(0, 0, 0, 0.055);
color: #888;
display: block;
margin: 8px 22px 8px 22px;
overflow: hidden;
width: 90%;
text-align: center;
}
nav ul {
margin: 0;
padding: 0;
}
nav ul li {
display: inline-block;
list-style-type: none;
-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 > a > .caret {
border-top: 4px solid #FFF;
border-right: 4px solid transparent;
border-left: 4px solid transparent;
content: "";
display: inline-block;
height: 0;
width: 0;
vertical-align: middle;
-webkit-transition: color 0.1s linear;
-moz-transition: color 0.1s linear;
-o-transition: color 0.1s linear;
transition: color 0.1s linear;
}
nav > ul > li > a {
color: #FFF;
display: block;
line-height: 56px;
padding: 0 24px;
text-decoration: none;
}
nav > ul > li:hover {
background-color: rgb(40, 44, 47);
}
nav > ul > li:hover > a {
color: rgb(255, 255, 255);
}
nav > ul > li:hover > a > .caret {
border-top-color: rgb(255, 255, 255);
}
nav > ul > li > div {
background-color: rgb(40, 44, 47);
border-top: 0;
border-radius: 0 0 4px 4px;
box-shadow: 0 2px 2px -1px rgba(0, 0, 0, 0.055);
display: none;
margin: 0;
opacity: 0;
position: absolute;
width: 165px;
visibility: hidden;
z-index: 100;
-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:hover > div {
display: block;
opacity: 1;
visibility: visible;
}
nav > ul > li > div ul > li {
display: block;
}
nav > ul > li > div ul > li > a {
color: #fff;
display: block;
padding: 12px 24px;
text-decoration: none;
}
nav > ul > li > div ul > li:hover > a {
background-color: rgba(255, 255, 255, 0.1);
}
<nav>
<ul>
<li>Home
</li>
<li>Teams <span class="caret"></span>
<div>
<ul>
<li>Link
</li>
<li>Link
</li>
<li>Link
</li>
<li>Link
</li>
<li>Link
</li>
<li>Link
</li>
<li>Link
</li>
<li>Link
</li>
<li>Link
</li>
<li>Link
</li>
<li>Link
</li>
<li>Link
</li>
</ul>
</div>
</li>
<li>Link
</li>
<li>Link
</li>
</ul>
</nav>
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'm having trouble creating the third level fligh out for a horizontal css menu. I've tried many different changes to the css to no avail. I have included the menu html and the css. What changes do I need to make to the css to have it work?
When 'ADD SCORES' is hovered over the 2 menus should show to the right
#menu {
background-color: #66A366;
padding: 6px 0 6px 20px;
}
#menu ul li a {
color: #fff;
text-decoration: none;
font-family:"Arial Narrow", "Myriad Pro";
}
#menu li {
color: #fff;
text-decoration: none;
font-family:"Arial Narrow", "Myriad Pro";
}
ul {
text-align: left;
display: inline;
margin: 0;
padding: 15px 4px 17px 0;
list-style: none;
-webkit-box-shadow: 0 0 5px rgba(0, 0, 0, 0.15);
-moz-box-shadow: 0 0 5px rgba(0, 0, 0, 0.15);
box-shadow: 0 0 5px rgba(0, 0, 0, 0.15);
}
ul li {
font: bold 14px/18px sans-serif;
display: inline-block;
margin-right: -4px;
position: relative;
padding: 15px 20px;
background: #66A366;
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;
}
ul li:hover {
background: #555;
color: #fff;
}
ul li ul {
padding: 0;
position: absolute;
top: 48px;
left: 0;
width: 150px;
-webkit-box-shadow: none;
-moz-box-shadow: none;
box-shadow: none;
display: none;
opacity: 0;
z-index:1000;
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;
}
ul li ul li {
background: #555;
display: block;
color: #fff;
text-shadow: 0 -1px 0 #000;
}
ul li ul li:hover {
background: #666;
}
ul li:hover ul {
display: block;
opacity: 1;
visibility: visible;
}
ul li ul li:hover li{
display: block;
opacity: 1;
visibility: visible;
}
ul li ul li ul li{
padding: 15px 20px;
font: bold 14px/18px sans-serif;
display: none;
position: relative;
top: -48px;
left: 154px;
width: 120px;
-webkit-box-shadow: none;
-moz-box-shadow: none;
box-shadow: none;
opacity: 0;
z-index:1000;
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;
}
<div id="menu">
<ul>
<li>SCORES
<ul>
<li>ADD SCORES
<ul>
<li>Level 3-A-1</li>
<li>Level 3-A-2</li>
</ul>
</li>
<li>EDIT SCORES</li>
</ul>
</li>
<li>PLAYERS
<ul>
<li>ADD PLAYER</li>
<li>EDIT PLAYERS</li>
</ul>
</li>
<li>COURSES
<ul>
<li>ADD COURSE</li>
<li>EDIT COURSES</li>
</ul>
</li>
<li>ADMIN</li>
</ul>
</div>
Demo FIDDLE
I'm not sure how you want your menu to look like, but I noticed that you forgot to wrap the tabs inside a <ul></ul> tag.
If you do that, the menu will look and behave like what most users would expect.
<div id="menu">
<ul> <-- here
<li>SCORES
// some code
<li>ADMIN</li>
</ul> <-- and here
</div>
You can save your time using Swimbi - Swift Menu Builder
- http://f-source.com/swimbi/
have a look at menu demo
I'm starting to get desperate cause I just cannot figure this out, so I'd like to ask you guys for help.
HTML:
<div id="wp-nav">
<ul>
<li><a href='#'>ENGLISH</a>
<ul>
<li><img src="images/gb.gif"/>
</li>
</ul>
</li>
<li><a href='#'>SRPSKI</a>
<ul>
<li><img src="images/rs.gif"/>
</li>
</ul>
</li>
</ul>
</div>
CSS:
#wp-nav {
text-align: center;
margin: 0 auto;
position: relative;
top: 130px;
width: auto;
}
#wp-nav ul {
margin: 0;
padding: 0;
list-style: none;
}
#wp-nav > ul > li {
margin-top: 20px;
padding: 0;
background: #000;
border-radius: 10px;
opacity: 0.8;
width: 150px;
height: 50px;
}
#wp-nav > ul > li {
display: inline-block;
position: relative;
}
#wp-nav > ul > li:hover {
background: #fff;
}
#wp-nav ul li a {
display: block;
margin: 0;
padding: 0;
text-decoration: none;
color: #fff;
font-family: Verdana, "Open Sans", sans-serif;
font-size: 12px;
line-height: 50px;
-webkit-transition: color .15s;
-moz-transition: color .15s;
-o-transition: color .15s;
transition: color .15s;
}
#wp-nav > ul > li > a:hover {
color: #000;
}
#wp-nav > ul > li > ul {
margin: 10px auto 0;
opacity: 0;
visibility: hidden;
background-color: rgba(0, 0, 0, 0);
text-align: center;
width: 45px;
height: 30px;
-webkit-transition: all .3s .1s;
-moz-transition: all .3s .1s;
-o-transition: all .3s .1s;
transition: all .3s .1s;
}
#wp-nav > ul > li:hover > ul{
opacity: 1;
visibility: visible;
}
So, basically, when I hover over English I want the Britain flag to show underneath the tab but I don't want to keep any properties of English <li> and when I :hover that flag, I don't want the English <li> to remain white as if it's hovered. Same goes for Serbian.
Thanks in advance.
change #wp-nav > ul > li:hover to #wp-nav > ul > li > a:hover
DEMO
Add this.
Css:
#wp-nav > ul> li:hover > a {
color: #fff;
background: #000;
border-radius: 10px;
}
Fiddle: http://jsfiddle.net/LTpRC/