I found out that the hover effect from the main menu disappears if I want to go to the second menu level. Here you find the example:
HTML:
<div id="background-slider">
<a href="http://www.hdwallpapersarena.com/wp-content/uploads/2012/10/Opera-Background-Blue-Swirls.jpg"></a>
<a href="http://www.hdwallpapersarena.com/wp-content/uploads/2012/10/green-abstract-background.jpg"></a>
</div>
<div id="menu">
<nav>
<ul class="nav-level-1">
<li class="level-1 clearfix">
<a href="unternehmen.html" class="level-1">Unternehmen</a>
<ul class="nav-level-2">
<li class="level-2"><a href="/unternehmen/die-firma.html" class="level-2">Die Firma</a></li>
<li class="level-2"><a href="/unternehmen/das-team.html" class="level-2">Das Team</a></li>
<li class="level-2"><a href="/unternehmen/allgemeines.html" class="level-2">Allgemeines</a></li>
</ul>
</li>
</ul>
<div class="clearer"></div>
</nav>
</div>
<div id="script-section" class="hidden">
<script src="./js/jquery.superbgimage.min.js"></script>
<script>
$(document).ready(function(){
// Options for SuperBGImage
$.fn.superbgimage.options = {
transition: 1,
speed: 'slow',
randomtransition: 0,
slideshow: 1,
slide_interval: 6000,
randomimage: 0
};
// initialize SuperBGImage
$('#background-slider').superbgimage().hide;
});
</script>
</div>
CSS:
#menu {
position: fixed;
z-index: 4;
left: 23px;
bottom: 40px;
}
ul.nav-level-1 {
float: left;
text-align: left;
}
ul.nav-level-1 li.level-1 {
/*float: left;*/
}
ul.nav-level-1 li.level-1 a.level-1 {
font-family: 'SourceSansProBlack', Arial, sans-serif;
font-size: 36px;
line-height: 40px;
text-transform: uppercase;
text-decoration: none;
color: #123373;
padding: 0 5px;
transition: color 0.25s ease 0s, background-color 0.25s ease 0s;
float: left;
}
ul.nav-level-1 li.level-1 a.level-1:hover {
text-decoration: none;
color: #123373;
background-color: #FFF;
display: inline-block;
}
ul.nav-level-1 li:hover a {
background-color: #FFF;
}
ul.nav-level-1 li.level-1:hover ul.nav-level-2 {
display: block;
}
ul.nav-level-2 {
display: none;
float: left;
width: 390px;
padding-left: 10px;
text-align: left;
}
ul.nav-level-2 li.level-2 {
margin-bottom: 3px;
margin-right: 5px;
float: left;
}
ul.nav-level-2 li.level-2 a.level-2{
font-family: 'SourceSansProBold', Arial, sans-serif;
font-size: 14px;
line-height: 16px;
text-transform: uppercase;
text-decoration: none;
color: #123373;
padding: 0 5px;
background-color: #FFF;
transition: color 0.25s ease 0s, background-color 0.25s ease 0s;
}
ul.nav-level-2 li.level-2 a.level-2:hover{
background-color: #123373;
color: #FFF;
}
The slider I'm using is called SuperBGImage. If I remove the slider everything works!
I thin it's the z-Index bug of IE but I tried different options by adding position: relative;
without success. How do I get the hover effect fixed in IE?
I tried this JS code but it doesn't help either:
$('li.level-1').hover(function() {
$(this).children('ul.nav-level-2').removeClass('hidden');
$(this).children('ul.nav-level-2').addClass('visible');
});
$('ul.nav-level-2').mouseout(function() {
$(this).removeClass('visible');
$(this).addClass('hidden');
});
Perhaps it is a float issue. If I remove float: left;
than it works better but it is not the design which it should be.
Edit:
Here you can download the project. I noticed another thing. If I start the Internet Explorer he asks me if I want to start the scripts or the Active-X elements. Why does he ask me that? I know it's because the slider but it should be normal Javascript. Perhaps the JS from the slider does something special here ...