Hello everyone,
I hope someone could help me with this problem.
I have a problem with a vertical menu that I'm trying to insert in a sidebar in a wordpress based site. The problem is that when hover the sub menus only are visible in the sidebar area, the other part is hidden or behind the central div.
How can I fix this problem?
The problem can be seen in this sample
and the correct behavior and the HTML and CSS code are here
I insert the code below for easy access.
<style type="text/css">
#navigation {font-size:0.75em; width:210px;}
#navigation ul {margin:0px; padding:0px;}
#navigation li {list-style: none;}
ul.top-level {background:#000080;}
ul.top-level li {
border-bottom: #fff solid;
border-top: #fff solid;
border-width: 1px;
}
#navigation a {
color: #fff;
cursor: pointer;
display:block;
height:25px;
font-size:13px;
line-height: 25px;
text-indent: 10px;
text-decoration:none;
width:100%;
}
#navigation a:hover{
text-decoration:underline;
}
#navigation li:hover {
background: #f90;
position: relative;
}
ul.sub-level {
display: none;
}
li:hover .sub-level {
background: #888;
border: #fff solid;
border-width: 1px;
display: block;
position: absolute;
left: 120px;
top: 5px;
}
ul.sub-level li {
border: none;
float:left;
width:150px;
}
#navigation .sub-level {
background: #999;
}
</style>
<div id="navigation">
<ul class="top-level">
<li><a href="#" style="color:#fff;">Documents Updates</a>
<ul class="sub-level">
<li><a href="#">Sub Menu Documents1</a></li>
<li><a href="#">Sub Menu Documents2</a></li>
</ul>
</li>
<li><a href="#" style="color:#fff;">Our History</a>
<ul class="sub-level">
<li><a href="#">Sub Menu History1</a></li>
</ul>
</li>
<li><a href="#" style="color:#fff;">News</a>
<ul class="sub-level">
<li><a href="#">Sub Menu News1</a></li>
<li><a href="#">Sub Menu News2</a></li>
</ul>
</li>
</ul>
</div>
Many thanks in advance for any help.
Regards