CSS Expanding Navigation Issue - html

We have some how managed to put out a css expandable navigation stuff... the problem what i am facing is you can see by mouse over on Home its expanding but you will also see that the last menu is blank... As well when you see the Portfolio mouse over you will see there are 3 menus only buy actually there are 5...
Ultimately what i want is what ever the total number of sub menus we provide may be 10 or 5 or 3 or even 2 the main menu should expand and show the same.
Can you please help with the issue...
HTML Code
<div class="nav">
<div class="menu-item alpha">
<h4>User Managment</h4>
<ul>
<li>View Users</li>
<li>Edit User</li>
</ul>
</div>
<div class="menu-item">
<h4>Portfolio</h4>
<ul>
<li>Web</li>
<li>Print</li>
<li>Other</li>
<li>Other</li>
<li>Other</li>
<li>Other</li>
</ul>
</div>
<div class="menu-item">
<h4>About</h4>
<ul>
<li>History</li>
<li>Meet The Owners</li>
<li>Awards</li>
</ul>
</div>
<div class="menu-item">
<h4>Contact</h4>
<ul>
<li>Phone</li>
<li>Email</li>
<li>Location</li>
</ul>
</div>
</div>
CSS Code As Follows
.nav * {
margin: 0px;
padding: 0px;
}
.nav {
font-family: Helvetica, Arial, "Lucida Grande", sans-serif;
font-size: 13px;
line-height: 1.5;
}
.menu-item {
background: #fff;
width: 200px;
}
/*Menu Header Styles*/
.menu-item h4 {
border-bottom: 1px solid rgba(0,0,0,0.3);
border-top: 1px solid rgba(255,255,255,0.2);
color: #fff;
font-size: 15px;
font-weight: 500;
padding: 7px 12px;
/*Gradient*/
background: #a90329; /* Old browsers */
background: -moz-linear-gradient(top, #a90329 0%, #8f0222 44%, #6d0019 100%); /* FF3.6+ */
background: -webkit-gradient(linear, left top, left bottom, color-stop(0%,#a90329), color-stop(44%,#8f0222), color-stop(100%,#6d0019)); /* Chrome,Safari4+ */
background: -webkit-linear-gradient(top, #a90329 0%,#8f0222 44%,#6d0019 100%); /* Chrome10+,Safari5.1+ */
background: -o-linear-gradient(top, #a90329 0%,#8f0222 44%,#6d0019 100%); /* Opera 11.10+ */
background: -ms-linear-gradient(top, #a90329 0%,#8f0222 44%,#6d0019 100%); /* IE10+ */
background: linear-gradient(top, #a90329 0%,#8f0222 44%,#6d0019 100%); /* W3C */
filter: progid:DXImageTransform.Microsoft.gradient( startColorstr='#a90329', endColorstr='#6d0019',GradientType=0 ); /* IE6-9 */
}
.menu-item h4:hover {
background: #cc002c; /* Old browsers */
background: -moz-linear-gradient(top, #cc002c 0%, #6d0019 100%); /* FF3.6+ */
background: -webkit-gradient(linear, left top, left bottom, color-stop(0%,#cc002c), color-stop(100%,#6d0019)); /* Chrome,Safari4+ */
background: -webkit-linear-gradient(top, #cc002c 0%,#6d0019 100%); /* Chrome10+,Safari5.1+ */
background: -o-linear-gradient(top, #cc002c 0%,#6d0019 100%); /* Opera 11.10+ */
background: -ms-linear-gradient(top, #cc002c 0%,#6d0019 100%); /* IE10+ */
background: linear-gradient(top, #cc002c 0%,#6d0019 100%); /* W3C */
filter: progid:DXImageTransform.Microsoft.gradient( startColorstr='#cc002c', endColorstr='#6d0019',GradientType=0 ); /* IE6-9 */
}
.menu-item h4 a {
color: white;
display: block;
text-decoration: none;
width: 200px;
}
/*ul Styles*/
.menu-item ul {
background: #fff;
font-size: 13px;
line-height: 30px;
height: 0px;
list-style-type: none;
overflow: hidden;
padding: 0px;
/*Animation*/
-webkit-transition: height 2s ease;
-moz-transition: height 1s ease;
-o-transition: height 1s ease;
-ms-transition: height 1s ease;
transition: height 1s ease;
}
.menu-item:hover ul {
height: 93px;
}
.menu-item ul a {
margin-left: 20px;
text-decoration: none;
color: #aaa;
display: block;
width: 200px;
}
/*li Styles*/
.menu-item li {
border-bottom: 1px solid #eee;
}
.menu-item li:hover {
background: #eee;
}
/*First Item Styles*/
.alpha p {
padding: 8px 12px;
color: #aaa;
}
.alpha p a {
color: #aaa;
font-style: italic;
}
.alpha p a:hover {
color: #ccc;
}

add the following and it should work as desired, basically you will need the height in pixels for the animation to continue to work so setting it to auto will disrupt the animation. Here in the code below I have considered a height of 31px per item in the menu
.menu-item:hover ul {
height: 93px;
}
.menu-item:nth-child(1):hover ul {
height: 63px;
}
.menu-item:nth-child(2):hover ul {
height: 155px;
}

Try to change .menu-item:hover ul class height to auto, you are limiting it to height as 93px. so remaining links were hidden
.menu-item:hover ul {
height: auto;
}
Updated demo:
CSS:
.menu-item ul {
max-height: 0px;
/*Animation*/
-webkit-transition: max-height 2s ease;
-moz-transition: max-height 1s ease;
-o-transition: max-height 1s ease;
-ms-transition: max-height 1s ease;
transition: max-height 1s ease;
}
.menu-item:hover ul {
max-height: 1000px;
}

Related

Header disappears at right side of page

I am trying to get my template working and I have a test page so you can see the miss-hap.
http://merkd.com/gtamoney
The header disappears in the top right corner of the page, but the header border at the bottom of the header seems unaffected and runs the whole length of the page. My CSS is below; I placed the #header and #headerBorder at the top but I also included the rest of the CSS for all the objects in the header just in case it's relevant.
#headerBorder {
display: block;
position: fixed;
z-index: 99;
top: 3.0em;
width: 100%;
height: 0.5em;
background: #ffffff; /* Old browsers */
background: -moz-linear-gradient(top, #ffffff 0%, #cccccc 100%); /* FF3.6+ */
background: -webkit-gradient(linear, left top, left bottom, color-stop(0%,#ffffff), color-stop(100%,#cccccc)); /* Chrome,Safari4+ */
background: -webkit-linear-gradient(top, #ffffff 0%,#cccccc 100%); /* Chrome10+,Safari5.1+ */
background: -o-linear-gradient(top, #ffffff 0%,#cccccc 100%); /* Opera 11.10+ */
background: -ms-linear-gradient(top, #ffffff 0%,#cccccc 100%); /* IE10+ */
background: linear-gradient(to bottom, #ffffff 0%,#cccccc 100%); /* W3C */
filter: progid:DXImageTransform.Microsoft.gradient( startColorstr='#ffffff', endColorstr='#cccccc',GradientType=0 ); /* IE6-9 */
}
#header {
position: fixed;
width: 100%;
top: 0;
z-index: 100;
left: 0;
background-color: #FFFFFF;
height: 3.0em;
}
#header #logo {
position: fixed;
left: 3.0em;
top: 0.4em;
width: 7.25em;
height: 3.0em;
}
#header a {
display: block;
float: right;
height: 2.25em;
font-size: 0.9em;
text-decoration: none;
font-weight: 600;
color: #777777;
text-transform: uppercase;
letter-spacing: 0.01em;
margin: 0.15em 0 0 2.5em;
padding: 1.25em 0.5em 0.2em 0.5em;
transition: color 0.30s ease-in-out;
-o-transition: color 0.30s ease-in-out;
-moz-transition: color 0.30s ease-in-out;
-webkit-transition: color 0.30s ease-in-out;
} #header a:last-of-type { margin-left: 0; }
#header a:hover {
color: #000000;
}
#header div {
float: right;
margin: -0.1em 2.0em 0 0;
}
#header div a {
margin: 0;
}
#header div a img {
width: 1.5em;
height: 1.5em;
opacity: 0.6;
margin: 0;
}
#header div a:hover img {
opacity: 1.0;
transition: opacity 0.30s ease;
-o-transition: opacity 0.30s ease;
-moz-transition: opacity 0.30s ease;
-webkit-transition: opacity 0.30s ease;
}
Remove
#header { right: 10em; }
from alpha.header.css
CSS should looks like below
body {
background-color: #AAAAAA;
background-image: url("/engine/img/texture.png");
background-repeat: repeat;
margin: 0; }
#header {
background-color: #FFFFFF;
height: 3em;
min-width: 100%;
right: 10em;
top: 0;
z-index: 100; }
#headerBorder {
background: linear-gradient(to bottom, #FFFFFF 0%, #CCCCCC 100%) repeat scroll 0 0 rgba(0, 0, 0, 0);
display: block;
height: 0.5em;
top: 3em;
width: 100%;
z-index: 99; }
Note: Try not to use position:fixed.

CSS3 animation transition: opacity not working

i'm having some trouble with animating a dropdown menu using css3. I need it to work with css3 and not jQuery or javascript. I've added all the rules neccessary but still the effect doesn't happen. Can anyone please help? Here is a fiddle of my code. Thank you.
http://jsfiddle.net/Zmr7u/6/
html code:
<header class="main-header">
<nav class="main-nav">
<ul class="top-nav">
<li>
home
<ul class="drop-down">
<li>1</li>
<li>2</li>
<li>3</li>
</ul>
</li>
<li>
about
<ul class="drop-down">
<li>1</li>
<li>2</li>
<li>3</li>
</ul>
</li>
<li>
products
<ul class="drop-down">
<li>1</li>
<li>2</li>
<li>3</li>
</ul>
</li>
<li>
contacts
<ul class="drop-down">
<li>1</li>
<li>2</li>
<li>3</li>
</ul>
</li>
</ul>
</nav>
</header>
css code:
nav.main-nav {
background: #333;
background-image: -webkit-gradient(linear, 0% 0%, 0% 100%, from(#2f2f2f), to(#4f4f4f));
background-image: -webkit-linear-gradient(top, #2f2f2f, #4f4f4f);
background-image: -moz-linear-gradient(top, #2f2f2f, #4f4f4f);
background-image: -ms-linear-gradient(top, #2f2f2f, #4f4f4f);
background-image: -o-linear-gradient(top, #2f2f2f, #4f4f4f);
background-image: linear-gradient(top, #2f2f2f, #4f4f4f);
width: 100%;
}
.top-nav {
border-bottom: 2px solid #111;
height: 30px;
list-style-type: none;
margin: 0;
padding-left: 0;
width: 100%;
}
.top-nav li {
background: #333;
background-image: -webkit-gradient(linear, 0% 0%, 0% 100%, from(#2f2f2f), to(#4f4f4f));
background-image: -webkit-linear-gradient(top, #2f2f2f, #4f4f4f);
background-image: -moz-linear-gradient(top, #2f2f2f, #4f4f4f);
background-image: -ms-linear-gradient(top, #2f2f2f, #4f4f4f);
background-image: -o-linear-gradient(top, #2f2f2f, #4f4f4f);
background-image: linear-gradient(top, #2f2f2f, #4f4f4f);
border-bottom: 2px solid #111;
border-right: 1px solid #555;
float: left;
font-size: 14px;
height: 20px;
padding-top: 10px;
position: relative;
text-align: center;
width: 150px;
}
.top-nav li ul.drop-down {
position: absolute;
top: 32px;
left: 0;
visibility: hidden;
display: none;
opacity: 0;
-webkit-transition: opacity 0.3s;
-moz-transition: opacity 0.3s;
-o-transition: opacity 0.3s;
transition: opacity 0.3s;
}
.top-nav li:hover ul.drop-down {
visibility: visible;
opacity: 1;
display: block;
}
.top-nav li .drop-down li {
height: 20px;
-webkit-transition: height 0.3s ease;
-moz-transition: height 0.3s ease;
-o-transition: height 0.3s ease;
transition: height 0.3s ease;
}
.top-nav li .drop-down li:hover {
height: 30px;
}
.top-nav li a {
color: #aaa;
padding-top: 5px;
position: absolute;
top: 0;
left: 0;
width: 150px;
height: 25px;
text-decoration: none;
}
You can just use visibility without using display:
.top-nav li ul.drop-down {
list-style-type: none;
position: absolute;
top: 32px;
left: -40px;
visibility: hidden;
opacity: 0;
-webkit-transition: opacity 0.3s;
-moz-transition: opacity 0.3s;
-o-transition: opacity 0.3s;
transition: opacity 0.3s;
}
.top-nav li:hover ul.drop-down {
visibility: visible;
opacity: 1;
}
Demo.
You can use css animation when you want to increase opacity and make the element visible, like --
span {
display: none;
opacity: 0;
}
To make span visible
span {
display: block;
animation: visible 2s;
}
#keyframes visible {
from {
opacity: 0;
}
to {
opacity: 1;
}
}
And if you're getting a bug when make animation less than 1s then use animation: visible 0.5s forwards;

Mobile friendly over images - lightbox

Good evening, thanks for trying to help first off.
I have a 'portfolio' page with 45 images of houses I've built. They're laid out in a grid, 5 wide 9 down. Simply, when you click and expand the image in browser, it works great. However, when I view on mobile, it get's a little fishy. The image tends to stretch past the view of the screen.
My question is: how can I make the image stay in the viewport of say my mobile device instead of stretching passed the screen? I tried absolutely positioning the overlay, that didn't work.
The lightbox script i'm using: http://tympanus.net/Tutorials/CSS3Lightbox/index3.html
My portfolio page: http://www.ocalaplastering.com/portfolio.html
This would be my html heavily reduced. Multiply the "li" element times 45 and that's basically the page.
<body>
<div id="wrapper">
<div id="header"></div>
<div id="nav"></div>
<div content>
<ul class="lb-album">
<li>
<a href="#image-1">
<img src="images/work/thumbs/1.jpg" alt="image01">
<span>Expand</span>
</a>
<div class="lb-overlay" id="image-1">
<img src="images/work/full/1.jpg" alt="image01" />
<div>
Prev
Next
</div>
x Close
</div>
</li>
</ul>
</div>
</div>
</body>
As for the CSS, this is the styles for the aforementioned elements:
.lb-album{
width: 100%;
margin: 0 auto;
font-family: 'BebasNeueRegular', 'Arial Narrow', Arial, sans-serif;
}
.lb-album li{
float: left;
padding:0px;
padding-right:1px;
padding-bottom:1px;
position: relative;
list-style:none;
}
.lb-album li > a,
.lb-album li > a img{
display: block;
}
.lb-album li > a{
width: 150px;
height: 150px;
position: relative;
padding: 3px;
background: #816445;
-webkit-box-shadow: 1px 1px 2px #fff, 1px 1px 2px rgba(158,111,86,0.3) inset;
-moz-box-shadow: 1px 1px 2px #fff, 1px 1px 2px rgba(158,111,86,0.3) inset;
box-shadow: 1px 1px 2px #fff, 1px 1px 2px rgba(158,111,86,0.3) inset;
-moz-border-radius: 4px;
-webkit-border-radius: 4px;
border-radius: 4px 4px 4px 4px;
}
.lb-album li > a span{
position: absolute;
width: 150px;
height: 150px;
top: 3px;
left: 3px;
text-align: center;
line-height: 150px;
color: rgba(27,54,81,0.8);
text-shadow: 0px 1px 1px rgba(255,255,255,0.6);
font-size: 24px;
opacity: 0;
filter: alpha(opacity=0); /* internet explorer */
-ms-filter:"progid:DXImageTransform.Microsoft.Alpha(opacity=0)"; /*IE8*/
background: rgb(241,210,194);
background: -moz-radial-gradient(center, ellipse cover, rgba(255,255,255,0.56) 0%, rgba(241,210,194,1) 100%);
background: -webkit-gradient(radial, center center, 0px, center center, 100%, color-stop(0%,rgba(255,255,255,0.56)), color-stop(100%,rgba(241,210,194,1)));
background: -webkit-radial-gradient(center, ellipse cover, rgba(255,255,255,0.56) 0%,rgba(241,210,194,1) 100%);
background: -o-radial-gradient(center, ellipse cover, rgba(255,255,255,0.56) 0%,rgba(241,210,194,1) 100%);
background: -ms-radial-gradient(center, ellipse cover, rgba(255,255,255,0.56) 0%,rgba(241,210,194,1) 100%);
background: radial-gradient(center, ellipse cover, rgba(255,255,255,0.56) 0%,rgba(241,210,194,1) 100%);
-webkit-transition: opacity 0.3s linear;
-moz-transition: opacity 0.3s linear;
-o-transition: opacity 0.3s linear;
-ms-transition: opacity 0.3s linear;
transition: opacity 0.3s linear;
}
.lb-album li > a:hover span{
opacity: 1;
filter: alpha(opacity=99); /* internet explorer */
-ms-filter:"progid:DXImageTransform.Microsoft.Alpha(opacity=99)"; /*IE8*/
}
.lb-overlay{
width: 0px;
height: 0px;
position: fixed;
overflow: hidden;
left: 0px;
top: 0px;
padding: 0px;
z-index: 99;
text-align: center;
background: rgb(241,210,194);
background: -moz-radial-gradient(center, ellipse cover, rgba(255,255,255,0.56) 0%, rgba(241,210,194,1) 100%);
background: -webkit-gradient(radial, center center, 0px, center center, 100%, color-stop(0%,rgba(255,255,255,0.56)), color-stop(100%,rgba(241,210,194,1)));
background: -webkit-radial-gradient(center, ellipse cover, rgba(255,255,255,0.56) 0%,rgba(241,210,194,1) 100%);
background: -o-radial-gradient(center, ellipse cover, rgba(255,255,255,0.56) 0%,rgba(241,210,194,1) 100%);
background: -ms-radial-gradient(center, ellipse cover, rgba(255,255,255,0.56) 0%,rgba(241,210,194,1) 100%);
background: radial-gradient(center, ellipse cover, rgba(255,255,255,0.56) 0%,rgba(241,210,194,1) 100%);
}
.lb-overlay > div{
position: relative;
color: rgba(27,54,81,0.8);
width: 550px;
height: 80px;
margin: 40px auto 0px auto;
text-shadow: 0px 1px 1px rgba(255,255,255,0.6);
}
.lb-overlay div p{
font-size: 14px;
text-align: left;
float: left;
width: 260px;
}
.lb-overlay a.lb-close{
background: rgba(27,54,81,0.8);
z-index: 1001;
color: #fff;
position: absolute;
top: 43px;
left: 50%;
font-size: 15px;
line-height: 26px;
text-align: center;
width: 50px;
height: 23px;
overflow: hidden;
margin-left: -25px;
opacity: 0;
filter: alpha(opacity=0); /* internet explorer */
-ms-filter:"progid:DXImageTransform.Microsoft.Alpha(opacity=0)"; /*IE8*/
-webkit-box-shadow: 0px 1px 2px rgba(0,0,0,0.3);
-moz-box-shadow: 0px 1px 2px rgba(0,0,0,0.3);
box-shadow: 0px 1px 2px rgba(0,0,0,0.3);
}
.lb-overlay img{
/* height: 100%; For Opera max-height does not seem to work */
max-height: 100%;
position: relative;
opacity: 0;
filter: alpha(opacity=0); /* internet explorer */
-ms-filter:"progid:DXImageTransform.Microsoft.Alpha(opacity=0)"; /*IE8*/
-webkit-box-shadow: 1px 1px 4px rgba(0,0,0,0.3);
-moz-box-shadow: 1px 1px 4px rgba(0,0,0,0.3);
box-shadow: 0px 2px 7px rgba(0,0,0,0.2);
-webkit-transition: opacity 0.5s linear;
-moz-transition: opacity 0.5s linear;
-o-transition: opacity 0.5s linear;
-ms-transition: opacity 0.5s linear;
transition: opacity 0.5s linear;
}
.lb-prev, .lb-next{
text-indent: -9000px;
position: absolute;
top: -32px;
width: 24px;
height: 25px;
left: 50%;
opacity: 0.8;
filter: alpha(opacity=80); /* internet explorer */
-ms-filter:"progid:DXImageTransform.Microsoft.Alpha(opacity=80)"; /*IE8*/
}
.lb-prev:hover, .lb-next:hover{
opacity: 1;
filter: alpha(opacity=99); /* internet explorer */
-ms-filter:"progid:DXImageTransform.Microsoft.Alpha(opacity=99)"; /*IE8*/
}
.lb-prev{
margin-left: -30px;
background: transparent url(../images/arrows.png) no-repeat top left;
}
.lb-next{
margin-left: 6px;
background: transparent url(../images/arrows.png) no-repeat top right;
}
.lb-overlay:target {
width: auto;
height: auto;
bottom: 0px;
right: 0px;
padding: 80px 100px 120px 100px;
}
.lb-overlay:target img,
.lb-overlay:target a.lb-close{
opacity: 1;
filter: alpha(opacity=99); /* internet explorer */
-ms-filter:"progid:DXImageTransform.Microsoft.Alpha(opacity=99)"; /*IE8*/
}
/*
100% Height for Opera as the max-height seems to be ignored, not optimal for large screens
http://bricss.net/post/11230266445/css-hack-to-target-opera
*/
x:-o-prefocus, .lb-overlay img {
height: 100%;
}
There isn't jQuery involved, so i'm assuming it will just be a very simple property to add, but I cannot figure it out.
Cheers for the help!
This can be solved with a simple addition to your CSS on line 355 (.lb-overlay img):
Add a max-width: 100%; below the max-height:100%;
Let me know if that makes it behave how you are expecting!

make div shapes disappear after transition

Hi guys I have a pretty simple one:
How can I make before and after CSS properties (mainly used to make a DIV shape) disappear after a transition. I am working on a project for class and can't seem to figure it out.
The page is supposed to look like this:
http://ista230.com/images/assignments/7/page2.jpg
Heres what i have for CSS:
/* Navigation */
#nav{
margin-bottom:2%;
margin-top:0%;
width:100%;
background: #1d6287;
}
#nav ul {
padding: 100px 0 0; /* Remove default but add 40px to top */
margin: 0; /* Remove default */
list-style: none;
width: 100%;
overflow: hidden; /* So it 'contains' the floated <li> elements */
}
#nav ul li {
text-align:center;
float: left;
min-height: 50px;
width: 20%; /* 6 items means 20% each */
position: relative;
}
#nav a {
text-decoration:none;
color:black;
display: block;
width: 100%; /* 100% of <li> */
position: absolute;
bottom: 0;
left: 0;
}
div.navItem {
padding: 4% 4%;
position: relative;
background: #D54D25;
border: 2px solid #D54D25;
}
/* For little dumb triangle */
div.navItem:after, div.navItem:before {
bottom: 100%;
border: solid transparent;
content: " ";
height: 1px;
width: 1px;
position: absolute;
pointer-events: none;
}
div.navItem:after {
border-color: rgba(136, 183, 213, 0);
border-bottom-color: #D54D25;
border-width: 10px;
left: 50%;
margin-left: -30px;
}
div.navItem:before {
border-color: rgba(213, 77, 37, 0);
border-bottom-color: #D54D25;
border-width: 26px;
left: 40%;
margin-left: -26px;
}
div.navItem{
-moz-transition: height .5s ease; /* Firefox 4 */
-webkit-transition: height .5s ease; /* Safari and Chrome */
-o-transition: height .5s ease; /* Opera */
-ms-transition: height .5s ease; /* IE9 (maybe) */
transition:height .5s ease;
}
.navItem:hover
{
background: #999; /* Old browsers */
color:white;
border:none;
background: #999;
background-image: url("../images/logo.png") no-repeat center; /* fallback */
background: url("../images/logo.png") no-repeat center, -webkit-gradient(linear, left top, left bottom, from(#6cab26), to(#6ceb86)); /* Saf4+, Chrome */
background: url("../images/logo.png")no-repeat center, -webkit-linear-gradient(top, #999, #FEFEFE); /* Chrome 10+, Saf5.1+ */
background: url("../images/logo.png")no-repeat center, -moz-linear-gradient(top, #999, #FEFEFE); /* FF3.6+ */
background: url("../images/logo.png")no-repeat center, -ms-linear-gradient(top, #999, #FEFEFE); /* IE10 */
background: url("../images/logo.png")no-repeat center, -o-linear-gradient(top, #999, #FEFEFE); /* Opera 11.10+ */
background: url("../images/logo.png")no-repeat center, linear-gradient(top, #999, #FEFEFE); /* W3C */
height: 130px;
}
And the HTML:
<nav id="nav">
<ul>
<li><div class="navItem">Home</div></li>
<li><div class="navItem">Upcoming Flights</div></li>
<li><div class="navItem">About Us</div></li>
<li><div class="navItem">Travel Guide</div></li>
<li><div class="navItem">Contact Us!</div></li>
</ul>
</nav>
if you want to disappear up arrow, after hovering menu item you can use this selector:
div.navItem:hover:before{
opacity:0;
}
this selector works for your code. I made some change in your code you can see it here: jsFiddle
You can use jQuery to listen to transition end
jQuery(".navItem").one('webkitTransitionEnd otransitionend oTransitionEnd msTransitionEnd transitionend', function(e) {
your function here;
});
See demo here http://jsfiddle.net/Godinall/Aq2SB/

Dropdown hidden by parent div

My navagation menu will work in IE8 but works in IE7,9,10. It appears that the #nav_wrap is hiding the the sub menu on hover (if I expand the height of the #nav_wrap i can see the sub menu on hover but only the amount added by the parent container height). I am lost at this point and have no idea how to resolve it since it works in all other IEs, Chrome, Safari and Moz. Any please have an idea???
HTML
<div id="nav_wrap">
<div id="nav">
<?php wp_nav_menu( array( 'theme_location' => 'header-menu',) ); ?>
</div>
</div>
CSS
#nav_wrap {
height: 38px;
width: 100%;
margin: -20px auto;
position: absolute;
left: 0;
z-index: 400;
}
/*-- Nav --*/
#nav {
width: 648px;
height: 98%;
z-index: 10;
margin: 0px auto;
font-family: 'Marcellus SC', serif;
font-size: 16px;
letter-spacing: 1px;
font-style:italic;
z-index: 400;
background: #dc0000; /* Old browsers */
background: -moz-linear-gradient(top, #dc0000 0%, #650101 100%); /* FF3.6+ */
background: -webkit-gradient(linear, left top, left bottom, color-stop(0%,#dc0000), color-stop(100%,#650101)); /* Chrome,Safari4+ */
background: -webkit-linear-gradient(top, #dc0000 0%,#650101 100%); /* Chrome10+,Safari5.1+ */
background: -o-linear-gradient(top, #dc0000 0%,#650101 100%); /* Opera11.10+ */
background: -ms-linear-gradient(top, #dc0000 0%,#650101 100%); /* IE10+ */
filter: progid:DXImageTransform.Microsoft.gradient( startColorstr='#dc0000', endColorstr='#650101',GradientType=0 ); /* IE6-9 */
background: linear-gradient(top, #dc0000 0%,#650101 100%); /* W3C */
}
#nav ul,
#nav li,
div.menu ul,
div.menu ul li,
ul.menu, ul.menu li {
list-style: none;
padding: 0;
margin: 0;
display: inline;
}
#nav ul li {
float: left;
position: relative;
}
#nav ul li a {
display: block;
padding: 8px 12px;
margin: 1px;
font-size: 15px;
white-space: nowrap;
border-radius: 24px;
color: white;
-webkit-transition: color .3s ease-in-out;
-moz-transition: color .3s ease-in-out;
-o-transition: color .3s ease-in-out;
}
#nav ul li a:hover { color: #081b3d; }
#nav ul ul {
position: absolute;
top: -99999px;
left: 0;
opacity: 0; /* Hide sub level */
-webkit-transition: opacity .5s ease-in-out;
-moz-transition: opacity .5s ease-in-out;
-o-transition: opacity .5s ease-in-out;
z-index: 1497;
background: #dc0000;
padding: 2px;
border: 1px solid #dc0000;
border-top: none;
box-shadow: #111 0 3px 14px;
border-bottom-left-radius: 6px;
border-bottom-right-radius: 6px;
}
#nav ul ul ul {
position: absolute;
top: -99999px;
left: 100%;
opacity: 0;
-webkit-transition: opacity .5s ease-in-out; /* Hide sub levels */
-moz-transition: opacity .5s ease-in-out;
-o-transition: opacity .5s ease-in-out;
border-radius: 6px;
border: 1px solid #dc0000;
}
#nav ul li:hover > ul {
opacity: 1;
position: absolute;
top: 99%;
left: 0;
z-index: 497;
}
#nav ul ul li:hover > ul {
position: absolute;
top: 0;
left: 100%;
opacity: 1;
z-index: 497;
background: #081b3d;
}
the site
For those who ever had this it was fixed by removing
filter: progid:DXImageTransform.Microsoft.gradient( startColorstr='#dc0000', endColorstr='#650101',GradientType=0 ) !important; /* IE6-9 */
from all the nav containers. Not sure why.