I have this dilemma where I need to make my sub-menus hover over the other content on my page but I cannot seem to do this, I have searched and searched but to no avail. I am to the point where I just need a little bit of guidance on this. I’m still relatively new to css but have slowly gotten the hang of it over time. I just cannot seem to figure this one out though.
My issue is that when I hover over the tabs in my tab menu the drop come is triggered BUT it pushes everything else down, what I need is for it to simply hover over everything else.
This is the HTML code that I use.
<div id='cssmenu'>
<ul class="clearfix">
<li><a href="/xampp/customertable/">Home</a></li>
<li>
<li class='active'><a href="/xampp/profile/">Profile<span class="arrow">▼</span></a>
<ul class="sub-menu">
<li><a href="#">In Cinemas Now</a></li>
<li><a href="#">Coming Soon</a></li>
<li><a href="#">On DVD/Blu-ray</a></li>
<li><a href="#">Showtimes & Tickets</a></li>
</ul>
</li>
<li><a href="#">T.V. Shows</a></li>
<li class="current-item"><a href="#">Photos</a></li>
<li><a href="#">Site Help</a></li>
</ul>
</div>
While this is my css code, its ugly i know but its all i got lol.
/*----- Menu Outline -----*/
#cssmenu ul ul {
display: none;
}
#cssmenu ul li:hover > ul {
display:block;
}
/*Formatting for the text inside the submenu*/
#cssmenu li:hover > a, .current-item > a {
text-decoration:none;
color:#ffffff;
}
/*----- Bottom Level (sub Menu) -----*/
#cssmenu li:hover .sub-menu {
z-index:1;
opacity:1;
}
.clearfix:after {
display:inline-block;
clear:both;
}
.sub-menu {
width:103%;
padding:0px 0px;
position:absolute;
top:80%;
left:0px;
z-index:-1;
opacity:0;
transition:opacity linear 0.15s;
box-shadow:0px 2px 3px rgba(0,0,0,0.2);
background:#ffffff;
}
.sub-menu li {
display: inline-block;
font-size:16px;
}
.sub-menu li a:hover, .sub-menu .current-item a {
background:#1577a6;
}
Thank you for your assistence and your time!!!!!