Menu Transition Effect with Submenu - css

So I've hacked up this CSS menu tutorial and I'm almost done with customizing it, however I'm having 2 issues. Whenever I go over my "About" menu that contains two additional list links the transition works but then the content is shifted over to the left and fades out. The second is, i'm trying to have the bottom border slide up using CSS transition but it simply fades the color in. I've tried changing height, margin-bottom, bottom but no dice. I've attached the code and fiddle
HTML
<div id='cssmenu'>
<ul>
<li><a href='#'><span>Home</span></a></li>
<li class='has-sub'><a href='#'><span>About Us</span></a>
<ul>
<li class='has-sub'><a href='#'><span>The School</span></a>
</li>
<li class='has-sub'><a href='#'><span>Instructors</span></a>
</li>
</ul>
</li>
<li><a href='#'><span>Classes</span></a></li>
<li><a href='#'><span>Schedule</span></a></li>
<li><a href='#'><span>News</span></a></li>
<li><a href='#'><span>Programs</span></a></li>
<li class='last'><a href='#'><span>Contact</span></a></li>
</ul>
</div>
CSS
a {
-webkit-transition: all 0.2s linear 0.2s;
-moz-transition: all 0.2s linear 0.2s;
-ms-transition: all 0.2s linear 0.2s;
-o-transition: all 0.2s linear 0.2s;
transition: all 0.2s linear 0.2s;}
#cssmenu { width: 840px; padding: 0; margin: 0; border: 0; }
#cssmenu ul, #cssmenu li { list-style: none; margin: 0; padding: 0; }
#cssmenu ul { position: relative; z-index: 597; }
#cssmenu ul li { text-align:center; width: 120px; float: left; min-height: 1px; vertical-align: middle; }
#cssmenu ul li.hover, #cssmenu ul li:hover { position: relative; z-index: 599; cursor: default; }
#cssmenu ul ul { visibility: hidden; position: absolute; top: 100%; left: 0; z-index: 598; }
#cssmenu ul ul li { float: none; width: 200px; }
#cssmenu ul li:hover > ul { visibility: visible; }
#cssmenu ul ul li { bottom: 100; left: 0; margin-top: 0; font-weight: normal; }
#cssmenu a { display: block; line-height: 1em; text-decoration: none; }
#cssmenu { background: #000; font-family: 'Oxygen Mono', Tahoma, Arial, sans-serif; font-size: 12px; }
#cssmenu > ul { *display: inline-block; }
#cssmenu:after, #cssmenu ul:after { display: block; clear: both; }
#cssmenu ul ul a {background: #333;color: #FFF; border: 1px solid #fff; border-top: 0 none; line-height: 150%; padding: 16px 20px; }
#cssmenu ul ul li { position: relative; }
#cssmenu ul ul li:nth-child(1) > a { background: #333; border-bottom: 1px solid #FFF }
#cssmenu ul ul li:nth-child(1) > a:hover { color: #fff; background: #333}
#cssmenu ul ul li:nth-child(2) > a { background: #333; border-bottom: 1px solid #FFF;}
#cssmenu ul ul li:nth-child(2) > a:hover { color: #fff; background: #333; }
#cssmenu ul li:nth-child(1) > a { border-bottom: 5px solid #fff; }
#cssmenu ul li:nth-child(2) > a { border-bottom: 5px solid #ff6; }
#cssmenu ul li:nth-child(3) > a { border-bottom: 5px solid #f60; }
#cssmenu ul li:nth-child(4) > a { border-bottom: 5px solid #00f; }
#cssmenu ul li:nth-child(5) > a { border-bottom: 5px solid #0c6; }
#cssmenu ul li:nth-child(6) > a { border-bottom: 5px solid #63c; }
#cssmenu ul li:nth-child(7) > a { border-bottom: 5px solid #f00; }
#cssmenu ul li:nth-child(1) > a:hover { color: #000; background: #fff; }
#cssmenu ul li:nth-child(2) > a:hover { color: #000; background: #ff6; }
#cssmenu ul li:nth-child(3) > a:hover { background: #f60; }
#cssmenu ul li:nth-child(4) > a:hover { background: #00f; }
#cssmenu ul li:nth-child(5) > a:hover { background: #0c6; }
#cssmenu ul li:nth-child(6) > a:hover { background: #63c; }
#cssmenu ul li:nth-child(7) > a:hover { background: #f00; }
#cssmenu ul ul li.has-sub > a:after {position: absolute;top: 50%;right: 15px;margin-top: -8px; }
#cssmenu ul li.has-sub > a:after { margin-left: 5px; }
#cssmenu a { background: #000; color: #fff;padding: 0 20px; line-height: 45px; }

Try adding position: relative; to #cssmenu ul li. That will fix your issue with the sub-menu floating off to the left.
As for generating the effect of the color rising from the bottom, you could create a absolutely positioned <div> inside the <li> with a starting height of 5px and increase it to cover the entire box once you hover.
EDIT
Here is an example fiddle. http://jsfiddle.net/bbZS8/
I've only incorperated the effect on the second tab, (About Us).
#yellow-test
{
position: absolute;
bottom: -5px;
left: 0;
height: 5px;
width: 100%;
background-color: #FF6;
color: #FF6;
overflow: hidden;
line-height: 45px;
-webkit-transition: height .25s ease;
-moz-transition: height .25s ease;
-o-transition: height .25s ease;
transition: height .25s ease;
}
#cssmenu ul li:hover > div
{
height: 50px;
color: #000;
}
It's not perfect, but gives a good starting point to beginning tweaking.

Related

Submenu is hidden under slideshow in wordpress

I have my perfect dropdown menu in wordpress by css (no plugin) but I have just a problem: Submenu is hidden under slideshow. How can I fix it? this is the css menu code:
#cssmenu ul {
list-style: none;
margin: 0;
padding: 0;
display: block;
}
#cssmenu ul:after,
#cssmenu:after {
content: ' ';
display: block;
font-size: 0;
height: 0;
clear: both;
visibility: hidden;
}
#cssmenu ul li {
margin: 0;
padding: 0;
display: block;
position: relative;
}
#cssmenu ul li a {
text-decoration: none;
display: block;
margin: 0;
-webkit-transition: color .2s ease;
-moz-transition: color .2s ease;
-ms-transition: color .2s ease;
-o-transition: color .2s ease;
transition: color .2s ease;
-webkit-box-sizing: border-box;
-moz-box-sizing: border-box;
box-sizing: border-box;
}
#cssmenu ul li ul {
position: absolute;
left: -9999px;
top: auto;
}
#cssmenu ul li ul li {
max-height: 0;
position: absolute;
-webkit-transition: max-height 0.4s ease-out;
-moz-transition: max-height 0.4s ease-out;
-ms-transition: max-height 0.4s ease-out;
-o-transition: max-height 0.4s ease-out;
transition: max-height 0.4s ease-out;
background: #ffffff;
}
#cssmenu ul li ul li.has-sub:after {
display: block;
position: absolute;
content: '';
height: 10px;
width: 10px;
border-radius: 5px;
background: #000000;
z-index: 1;
top: 13px;
right: 15px;
}
#cssmenu.align-right ul li ul li.has-sub:after {
right: auto;
left: 15px;
}
#cssmenu ul li ul li.has-sub:before {
display: block;
position: absolute;
content: '';
height: 0;
width: 0;
border: 3px solid transparent;
border-left-color: #ffffff;
z-index: 2;
top: 15px;
right: 15px;
}
#cssmenu.align-right ul li ul li.has-sub:before {
right: auto;
left: 15px;
border-left-color: transparent;
border-right-color: #ffffff;
}
#cssmenu ul li ul li a {
font-size: 14px;
font-weight: 400;
text-transform: none;
color: #000000;
letter-spacing: 0;
display: block;
width: 170px;
padding: 11px 10px 11px 20px;
}
#cssmenu ul li ul li:hover > a,
#cssmenu ul li ul li.active > a {
color: #4cb6ea;
}
#cssmenu ul li ul li:hover:after,
#cssmenu ul li ul li.active:after {
background: #4cb6ea;
}
#cssmenu ul li ul li:hover > ul {
left: 100%;
top: 0;
}
#cssmenu ul li ul li:hover > ul > li {
max-height: 72px;
position: relative;
}
#cssmenu > ul > li {
float: left;
}
#cssmenu.align-center > ul > li {
float: none;
display: inline-block;
}
#cssmenu.align-center > ul {
text-align: center;
}
#cssmenu.align-center ul ul {
text-align: left;
}
#cssmenu.align-right > ul {
float: right;
}
#cssmenu.align-right > ul > li:hover > ul {
left: auto;
right: 0;
}
#cssmenu.align-right ul ul li:hover > ul {
right: 100%;
left: auto;
}
#cssmenu.align-right ul ul li a {
text-align: right;
}
#cssmenu > ul > li:after {
content: '';
display: block;
position: absolute;
width: 100%;
height: 0;
top: 0;
z-index: 0;
background: #ffffff;
-webkit-transition: height .2s;
-moz-transition: height .2s;
-ms-transition: height .2s;
-o-transition: height .2s;
transition: height .2s;
}
#cssmenu > ul > li.has-sub > a {
padding-right: 40px;
}
#cssmenu > ul > li.has-sub > a:after {
display: block;
content: '';
background: #ffffff;
height: 12px;
width: 12px;
position: absolute;
border-radius: 13px;
right: 14px;
top: 16px;
}
#cssmenu > ul > li.has-sub > a:before {
display: block;
content: '';
border: 4px solid transparent;
border-top-color: #4cb6ea;
z-index: 2;
height: 0;
width: 0;
position: absolute;
right: 16px;
top: 21px;
}
#cssmenu > ul > li > a {
color: #ffffff;
padding: 15px 20px;
font-weight: 700;
letter-spacing: 1px;
text-transform: uppercase;
font-size: 14px;
z-index: 2;
position: relative;
}
#cssmenu > ul > li:hover:after,
#cssmenu > ul > li.active:after {
height: 100%;
}
#cssmenu > ul > li:hover > a,
#cssmenu > ul > li.active > a {
color: #000000;
}
#cssmenu > ul > li:hover > a:after,
#cssmenu > ul > li.active > a:after {
background: #000000;
}
#cssmenu > ul > li:hover > a:before,
#cssmenu > ul > li.active > a:before {
border-top-color: #ffffff;
}
#cssmenu > ul > li:hover > ul {
left: 0;
}
#cssmenu > ul > li:hover > ul > li {
max-height: 72px;
position: relative;
}
#cssmenu #menu-button {
display: none;
}
#cssmenu > ul > li > a {
display: block;
}
#cssmenu > ul > li {
width: auto;
}
#cssmenu > ul > li > ul {
width: 170px;
display: block;
}
#cssmenu > ul > li > ul > li {
width: 170px;
display: block;
}
I hope someone can help me :) Thank you!
Find CSS property in your CSS and replace bellow
#cssmenu ul li ul li {
background: #000 none repeat scroll 0 0;
color: #fff;
max-height: 0;
position: relative;
transition: max-height 0.4s ease-out 0s;
z-index: 2147483647 !important;
}
#cssmenu ul li ul li a {
color: #fff;
display: block;
font-size: 14px;
font-weight: 400;
letter-spacing: 0;
padding: 11px 10px 11px 20px;
position: relative;
text-transform: none;
width: 170px;
}
chek the screenshot http://awesomescreenshot.com/08b60n7lf2
use position: absolute; and z-index: 11; for the submenu

How can I change the underline colour with the transition element in use? (CSS)

On my website, I have used a template to make my navigation bar. My goal is to customise it so that it looks like the BBC navigation bar. (Link:
http://www.bbc.co.uk) Is there any way I can change the border bottom/ underline colour with the transition element in use? And if so, can you please modify the code so that it acts like the BBC menu bar.
Thanks! :D
Code:
<!DOCTYPE html>
<html>
<head>
<style>
body {
font-family: Open Sans;
}
#cssmenu {
background: #f96e5b;
width: auto;
}
#cssmenu ul {
list-style: none;
margin: 0;
padding: 0;
line-height: 1;
display: block;
zoom: 1;
}
#cssmenu ul:after {
content: " ";
display: block;
font-size: 0;
height: 0;
clear: both;
visibility: hidden;
}
#cssmenu ul li {
display: inline-block;
padding: 0;
margin: 0;
}
#cssmenu.align-right ul li {
float: right;
}
#cssmenu.align-center ul {
text-align: center;
}
#cssmenu ul li a {
color: #ffffff;
text-decoration: none;
display: block;
padding: 15px 25px;
font-family: 'Open Sans', sans-serif;
font-weight: 700;
text-transform: uppercase;
font-size: 14px;
position: relative;
-webkit-transition: color .25s;
-moz-transition: color .25s;
-ms-transition: color .25s;
-o-transition: color .25s;
transition: color .25s;
}
#cssmenu ul li a:hover {
color: #00ff00;
}
#cssmenu ul li a:hover:before {
width: 100%;
}
#cssmenu ul li a:after {
content: "";
display: block;
position: absolute;
right: -3px;
top: 19px;
height: 6px;
width: 6px;
background: #ffffff;
opacity: .5;
}
#cssmenu ul li a:before {
content: "";
display: block;
position: absolute;
left: 0;
bottom: 0;
height: 3px;
width: 0;
background: #333333;
-webkit-transition: width .25s;
-moz-transition: width .25s;
-ms-transition: width .25s;
-o-transition: width .25s;
transition: width .25s;
}
#cssmenu ul li.last > a:after,
#cssmenu ul li:last-child > a:after {
display: none;
}
#cssmenu ul li.active a {
color: #333333;
}
#cssmenu ul li.active a:before {
width: 100%;
}
#cssmenu.align-right li.last > a:after,
#cssmenu.align-right li:last-child > a:after {
display: block;
}
#cssmenu.align-right li:first-child a:after {
display: none;
}
#media screen and (max-width: 768px) {
#cssmenu ul li {
float: none;
display: block;
}
#cssmenu ul li a {
width: 100%;
-moz-box-sizing: border-box;
-webkit-box-sizing: border-box;
box-sizing: border-box;
border-bottom: 1px solid #fb998c;
}
#cssmenu ul li.last > a,
#cssmenu ul li:last-child > a {
border: 0;
}
#cssmenu ul li a:after {
display: none;
}
#cssmenu ul li a:before {
display: none;
}
}
.dateOfPost {
font-weight: bold;
text-decoration: underline;
}
</style>
<script>
</script>
<title>Ryan Zhang's Blog</title>
</head>
<body>
<h1>
Ryan Zhang's Blog
</h1>
<div id='cssmenu'>
<ul>
<li class="active">
<span>Home</span>
</li>
<li>
<span>About Me</span>
</li>
<li>
<span>Tips 'n' Tricks</span>
</li>
<li>
<span>Inspirational Quotes and Words</span>
</li>
<li>
<span>Timeline of Me</span>
</li>
<li>
<span>Contact</span>
</li>
</ul>
</div>
<hr>
<p class="dateOfPost">
Website Goes Live!<br>
Upload Date:<br>
25/10/15
</p>
<p class="posts">
Wooh! The website is live now!<br>
Stick around for:<br>
Kind Words,<br>
Interesting Posts,<br>
Helpful Articles<br>
And Cool Facts!<br>
<br>
-Ryan
</p>
<hr>
</body>
</html>
CSS Navigation Bar Code:
#cssmenu {
background: #f96e5b;
width: auto;
}
#cssmenu ul {
list-style: none;
margin: 0;
padding: 0;
line-height: 1;
display: block;
zoom: 1;
}
#cssmenu ul:after {
content: " ";
display: block;
font-size: 0;
height: 0;
clear: both;
visibility: hidden;
}
#cssmenu ul li {
display: inline-block;
padding: 0;
margin: 0;
}
#cssmenu.align-right ul li {
float: right;
}
#cssmenu.align-center ul {
text-align: center;
}
#cssmenu ul li a {
color: #ffffff;
text-decoration: none;
display: block;
padding: 15px 25px;
font-family: 'Open Sans', sans-serif;
font-weight: 700;
text-transform: uppercase;
font-size: 14px;
position: relative;
-webkit-transition: color .25s;
-moz-transition: color .25s;
-ms-transition: color .25s;
-o-transition: color .25s;
transition: color .25s;
}
#cssmenu ul li a:hover {
color: #00ff00;
}
#cssmenu ul li a:hover:before {
width: 100%;
}
#cssmenu ul li a:after {
content: "";
display: block;
position: absolute;
right: -3px;
top: 19px;
height: 6px;
width: 6px;
background: #ffffff;
opacity: .5;
}
#cssmenu ul li a:before {
content: "";
display: block;
position: absolute;
left: 0;
bottom: 0;
height: 3px;
width: 0;
background: #333333;
-webkit-transition: width .25s;
-moz-transition: width .25s;
-ms-transition: width .25s;
-o-transition: width .25s;
transition: width .25s;
}
#cssmenu ul li.last > a:after,
#cssmenu ul li:last-child > a:after {
display: none;
}
#cssmenu ul li.active a {
color: #333333;
}
#cssmenu ul li.active a:before {
width: 100%;
}
#cssmenu.align-right li.last > a:after,
#cssmenu.align-right li:last-child > a:after {
display: block;
}
#cssmenu.align-right li:first-child a:after {
display: none;
}
#media screen and (max-width: 768px) {
#cssmenu ul li {
float: none;
display: block;
}
#cssmenu ul li a {
width: 100%;
-moz-box-sizing: border-box;
-webkit-box-sizing: border-box;
box-sizing: border-box;
border-bottom: 1px solid #fb998c;
}
#cssmenu ul li.last > a,
#cssmenu ul li:last-child > a {
border: 0;
}
#cssmenu ul li a:after {
display: none;
}
#cssmenu ul li a:before {
display: none;
}
}
They give each li its own class.
The easiest was to do this would be to give every li a border-bottom that matches the background color.
Then on hover, just change the border-color property for that specific li.
Like this:
<ul>
<li class="one">Lorem</li>
<li class="two">Lorem</li>
<li class="three">Lorem</li>
<li class="four">Lorem</li>
<li class="five">Lorem</li>
<li class="six">Lorem</li>
</ul>
li{
border-bottom: 5px solid transparent;
}
.one:hover{border-color: dodgerblue;}
.two:hover{border-color: seagreen;}
.three:hover{border-color: skyblue;}
.four:hover{border-color: tomato;}
.five:hover{border-color: grey;}
.six:hover{border-color: white;}
http://codepen.io/LukeD1uk/pen/EVRvjY
Have you thought about applying them the property border-bottom : Xpx solid #yourColor ?
I don't really see what you mean otherwise make a screenshot :)

Navigation Menu dropdown

i am having a problem which is small but frustrating:
look at the top menu on my site: www.integratedphysicaltherapy.ie
the "Sports Injury Management" link seems to be a effected by its dropdown element in some way. Ive had a look but can't see whats causing it. Any help would be much appreciated.
here is the code
#header .header-links .sub-menu {
display: none;
float: left;
position: absolute;
z-index: 1111;
border: 0px solid #303030;
background: #1C1C1C;
}
#header .header-links .sub-menu a {
color: white;
font-size: 12px;
border-bottom: 0px solid #303030;
line-height: 22px;
margin: 0;
padding: 0 0px 0 10px;
}
#header .header-links .sub-menu li:last-child > a {
border: 0;
}
#header .header-links .sub-menu a:hover,
#header .header-links .sub-menu .current-menu-item a {
}
#pre-header .sub-menu li,
#header .sub-menu li {
float: none;
position: relative;
}
#header .sub-menu li {
padding: 2px 1px;
}
#header .sub-menu li:hover {
padding-left: 1px;
}
#header .menu > li > a {
-webkit-transition: all 0.3s ease;
-moz-transition: all 0.3s ease;
-ms-transition: all 0.3s ease;
-o-transition: all 0.3s ease;
transition: all 0.3s ease;
}
#header .menu > li.menu-hover > a,
#header .menu > li.current_page_item > a,
#header .menu > li.current-menu-ancestor > a,
#header .menu > li > a:hover {
color: #F33F3F;
}
.main-navigation:after {
clear: both;
content: "";
display: block;
}
.main-navigation ul {
list-style: none;
margin: 0;
padding-left: 0;
}
.main-navigation .sub-menu a {
white-space: nowrap;
}
.main-navigation .sub-menu .sub-menu {
position: absolute;
top: -1px;
left: 100%;
}
.main-navigation ul ul :hover > a {
}
#pre-header .main-navigation ul li:hover > ul,
#header .main-navigation ul li:hover > ul {
display: block;
}

center a background imaged css menu from http://cssmenumaker.com

im using ready made dropdown menu from http://cssmenumaker.com/menu/grey-red-drop-down-menu
the menu is working pretty fine but i like to center the buttons.Is there any way to do that?
Here is the css code:
#import url(http://fonts.googleapis.com/css?family=Open+Sans:600);
/* Menu CSS */#cssmenu,
#cssmenu > ul {
background: url(images/highlight-bg.png) repeat;
padding-bottom: 3px;
font-family: 'Open Sans', sans-serif;
font-weight: 600;
}
#cssmenu:before,
#cssmenu:after,
#cssmenu > ul:before,
#cssmenu > ul:after {
content: '';
display: table;
}
#cssmenu:after,
#cssmenu > ul:after {
clear: both;
}
#cssmenu {
width: auto;
zoom: 1;
}
#cssmenu > ul {
background: url(images/menu-bg.png) repeat;
margin: 0;
padding: 0;
position: relative;
}
#cssmenu > ul li {
margin: 0;
padding: 0;
list-style: none;
}
#cssmenu > ul > li {
float: left;
position: relative;
}
#cssmenu > ul > li > a {
padding: 23px 26px;
display: block;
color: white;
font-size: 13px;
text-decoration: none;
text-transform: uppercase;
text-shadow: 0 -1px 0 #0d0d0d;
text-shadow: 0 -1px 0 rgba(0, 0, 0, 0.7);
line-height: 18px;
}
#cssmenu > ul > li:hover > a {
background: url(images/highlight-bg.png) repeat;
text-shadow: 0 -1px 0 #97321f;
text-shadow: 0 -1px 0 rgba(122, 42, 26, 0.64);
}
#cssmenu > ul > li > a > span {
line-height: 18px;
}
#cssmenu > ul > li.active > a,
#cssmenu > ul > li > a:active {
background: url(images/hover.png) repeat;
}
/* Childs */
#cssmenu > ul ul {
opacity: 0;
visibility: hidden;
position: absolute;
top: 120px;
background: url(images/menu-bg.png) repeat;
margin: 0;
padding: 0;
z-index: -1;
}
#cssmenu > ul li:hover ul {
opacity: 1;
visibility: visible;
margin: 0;
color: #000;
z-index: 2;
top: 64px;
left: 0;
}
#cssmenu > ul ul:before {
content: '';
position: absolute;
top: -10px;
width: 100%;
height: 20px;
background: transparent;
}
#cssmenu > ul ul li {
list-style: none;
padding: 0;
margin: 0;
width: 100%;
}
#cssmenu > ul ul li a {
padding: 18px 26px;
display: block;
color: white;
font-size: 13px;
text-decoration: none;
text-transform: uppercase;
width: 150px;
border-left: 4px solid transparent;
-webkit-transition: all 0.35s ease-in-out;
-moz-transition: all 0.35s ease-in-out;
-ms-transition: all 0.35s ease-in-out;
transition: all 0.35s ease-in-out;
}
#cssmenu > ul ul li a:hover {
border-left: 4px solid #d64e34;
background: url(images/hover.png) repeat;
}
#cssmenu > ul ul li a:active {
background: url(images/menu-bg.png) repeat;
}
Here is the basic html code:
<div id='cssmenu'>
<ul>
<li class='active'><a href='index.html'><span>Home</span></a></li>
<li class='has-sub'><a href='#'><span>Products</span></a>
<ul>
<li><a href='#'><span>Product 1</span></a></li>
<li class='last'><a href='#'><span>Product 2</span></a></li>
</ul>
</li>
<li><a href='#'><span>About</span></a></li>
<li class='last'><a href='#'><span>Contact</span></a></li>
</ul>
</div>
If you want to center the main menu links, you could try this:
#cssmenu ul {text-align: center;}
#cssmenu ul li {float: none; display: inline-block;}
Rather than float: none, you can just remove the original float on the lis.
If you are worried about the inline-block gaps that appear between the menu items, you could do this:
#cssmenu ul {text-align: center;display: table; width: 100%; word-spacing:-.25em;}
#cssmenu ul li {float: none; display: inline-block; word-spacing:0;}
To avoid the submenu text being centered, try this:
#cssmenu ul {text-align: center;display: table; width: 100%; word-spacing:-.25em;}
#cssmenu ul > li {float: none; display: inline-block; word-spacing:0;}
#cssmenu ul li li {text-align: left;}

Drop-down menu in CSS appears under page content

I have done hours and hours of research on this issue but can't get it to work! I finally got my CSS menu looking exactly how I want it to - yay! But now it drops down under the other content on the page, and I can't figure out how to get it to come up on top. I have adjusted the positioning as many people mentioned, and set the z-index settings all the way up to 2000, with no effect. What am I doing wrong?? Using Firefox - current version.
Here is the CSS code (and no, I don't have a link to show example, as the site isn't published yet)
#cssmenu:before, #cssmenu:after, #cssmenu > ul:before, #cssmenu > ul:after {
content: '';
display: table;
}
#cssmenu:after, #cssmenu > ul:after {
clear: both;
}
#cssmenu
{
zoom: 1;
}
#cssmenu > ul
{
background: #00305f;
margin: 0;
padding: 0;
position: relative;
}
#cssmenu > ul li
{
margin: 0;
padding: 0;
list-style: none;
}
#cssmenu > ul > li
{
float: left;
position: relative;
}
#cssmenu > ul > li > a
{
padding: 20px 25px;
display: block;
color: white;
font-family: Georgia, Times, Serif;
font-size: 20px;
text-transform: capitalize;
text-decoration: none;
text-shadow: 0 -1px 0 rgba(151, 99, 33, .43);
line-height: 18px;
}
#cssmenu > ul > li:hover > a
{
background: #5783af;
}
#cssmenu > ul > li > a > span
{
line-height: 18px;
}
#cssmenu > ul > li.active > a
{
background: #5783af;
}
#cssmenu > ul > li > a:active
{
background: #5783af;
}
#cssmenu > ul ul
{
opacity: 0;
visibility: hidden;
position: absolute;
top: 120px;
background: #00305f;
margin: 0;
padding: 0;
z-index: 2000;
-webkit-transition: all .35s .2s ease-in-out;
-moz-transition: all .35s .2s ease-in-out;
-ms-transition: all .35s .2s ease-in-out;
transition: all .35s .2s ease-in-out;
}
#cssmenu > ul li:hover ul
{
opacity: 1;
visibility: visible;
margin: 0;
color: #5783af;
z-index: 2000;
top: 64px;
left: 0;
}
#cssmenu > ul ul:before
{
content: '';
position: absolute;
top: -10px;
width: 100%;
height: 16px;
background: transparent;
}
#cssmenu > ul ul li
{
list-style: none;
padding: 0;
margin: 0;
width: 100%;
}
#cssmenu > ul ul li a
{
padding: 12px 20px;
display: block;
color: white;
font-family: Georgia, Times, Serif;
font-size: 16px;
text-transform: capitalize;
text-decoration: none;
width: 175px;
border-left: 4px solid transparent;
-webkit-transition: all .35s ease-in-out;
-moz-transition: all .35s ease-in-out;
-ms-transition: all .35s ease-in-out;
transition: all .35s ease-in-out;
text-shadow: 0 -1px 0 rgba(151, 99, 33, .43);
}
#cssmenu > ul ul li a:hover
{
border-left: 4px solid #055988;
background: #5783af;
}
#cssmenu > ul ul li a:active
{
background: #5783af;
}
HTML Code:
<div id='cssmenu'>
<ul>
<li class='has-sub'><a href='home.html'><span>Home</span></a>
<ul>
<li><a href='resources.html'><span>Resources</span></a></li>
<li><a href='products.html'><span>Products</span></a></li>
<li class='last'><a href='contact.html'><span>Contact Us</span></a></li>
</ul>
</li>
<li class='has-sub'><a href='health-wellness.html'><span>Health & Wellness</span></a>
<ul>
<li><a href='cooking-from-scratch.html'><span>Cooking From Scratch</span></a></li>
<li><a href='sustainable-gardening.html'><span>Sustainable Gardening</span></a></li>
<li><a href='csa.html'><span>Community Supported Agriculture</span></a></li>
<li><a href='fun-ways-to-exercise.html'><span>Fun Ways to Exercise</span></a></li>
<li><a href='pain-relief.html'><span>Natural Relief for Chronic Pain</span></a></li>
<li class='last'><a href='toxic-load.html'><span>Reducing Your Toxic
Load</span></a></li>
</ul>
</li>
<li><a href='relationships.html'><span>Relationships</span></a></li>
<li><a href='wealth.html'><span>Wealth</span></a></li>
<li class='last'><a href='spirituality.html'><span>Spirituality</span></a></li>
</ul>
</div>
Try with :
#cssmenu
{
zoom: 1;
z-index:9999 !important;
}

Resources