Hi guys, I'm having some CSS issues. I have a menu built with nested lists and styled with css, which worked fine. Now when I try to use that menu within my css-based layout page, the menus popouts seem to be stuck against the next div (not letting the mouse move across to them without disappearing).
I'm in a bit of a pickle because I'm supposed to have something to show my client by Friday, can anyone help?
see the menu not working here . If you fumble around with it long enough you can make it sort of work, but too iffy.
I know there is a lot of code here, but I think it may be something in the CSS/page layout part, not the actual menu, but I could be wrong.
Here is my HTML:
/*page layout*/
body {
margin-left: 0px;
margin-top: 0px;
margin-right: 0px;
margin-bottom: 0px;
background-color: #8B8B8B;
}
#header {
position: absolute;
height: 125px;
width: 100%;
left: 0px;
top: 0px;
margin: 0px;
padding: 0px;
background-color: #8B8B8B;
}
#headnav {
background-color: #3E497E;
height: 70px;
width: 773px;
margin-right: auto;
margin-left: auto;
margin-top: 0px;
padding: 0px;
}
#content {
position: absolute;
width: 100%;
top: 125px;
left: 0px;
}
#contentcell {
margin-right: auto;
margin-left: auto;
height: auto;
width: 773px;
background-image: url(../images/css_images_r3_c1.jpg);
}
#contentleft {
text-align: left;
width: 190px;
float: left;
position: relative;
margin: 0px;
padding-top: 0px;
padding-right: 0px;
padding-bottom: 0px;
padding-left: 2px;
}
#contentright {
height: auto;
width: 500px;
text-align: left;
float: left;
position: relative;
padding: 0px;
margin: 0px;
}
#footer {
width: 773px;
height: 60px;
text-align: center;
margin-top: 0px;
margin-right: auto;
margin-left: auto;
color: #99CCFF;
font-family: Arial, Helvetica, sans-serif;
font-size: 0.8em;
line-height: 1.4em;
}
.clear-both {
clear: both;
}
#contentrightBox {
height: auto;
width: 160px;
text-align: left;
float: right;
position: relative;
padding: 0px 6px 0px 0px;
margin: 10px 0px 3px;
}
/* Menu*/
/* For Menu Testing Only */
body, html{margin:0;padding:0;}
body{
height:764px;
}
.hand{cursor:pointer;}
.help{cursor:help;}
/* CSS Popout Menu */
#menu{
position:absolute;
top:5px;
left:5px;
background:#b3b1c0;
padding:1px;
z-index:2;
width:180px;
}
#menu a, #menu h2{
display:block;
font:bold 11px/16px arial,helvetica,sans-serif;
border-top:1px solid #ccc;
border-left:1px solid #bbb;
border-right:1px solid #888;
border-bottom:1px solid #555;
white-space:nowrap;
text-indent:2px;
width:180px;
}
#menu a{
background:#edeef6 url(nav/images/tile-silver-3.gif) repeat-x;
text-decoration:none;
}
#menu a, #menu a:visited{
color:#494c59;
}
#menu a:hover{
color:#000;
background:#e2e2ec url(nav/images/tile-blue-over-3.gif) repeat-x;
}
#menu a:active{
color:#060;
background:#e2e2ec url(nav/images/tile-blue-on-3.gif) repeat-x;
}
#menu h2{
font:bold 10px/16px tahoma,helvetica,sans-serif;
color:#fff;
background:#369 url(nav/images/tile-h2.gif) repeat-x;
text-transform:uppercase;
margin:0;
padding:0;
width:180px;
}
#menu li{
list-style-type:none;
}
#menu ul li{
position:relative;
}
#menu li ul{
position:absolute;
top:0;
left:182px;
display:none;
}
#menu li {
/* make the list elements a containing block for the nested lists */
position: relative;
}
#menu ul ul ul {
position: absolute;
top: 0;
left: 100%; /* to position them to the right of their containing block */
width: 100%; /* width is based on the containing block */
}
div#menu ul, #menu ul ul, div#menu ul ul ul{
margin:0;
padding:0;
list-style-image:none;
width:180px;
}
div#menu ul ul, div#menu ul ul ul, div#menu ul li:hover ul ul, div#menu ul li:hover ul ul ul{
display:none;
}
div#menu ul li:hover ul, div#menu ul ul li:hover ul, div#menu ul ul ul li:hover ul{
display:block;
}
/* Styling for Expand */
#menu a.x, #menu a.x:visited{
font-weight:bold;
text-indent:2px;
color:#494c59;
background:#edeef6 url(nav/images/tile-silver-3-x.gif) repeat-x;
}
#menu a.x:hover{
color:#000;
background:#edeef6 url(nav/images/tile-blue-over-3.gif) repeat-x;
}
#menu a.x:active{
color:#060;
background:#e2e2ec url(nav/images/tile-blue-on-3.gif) repeat-x;
}
#leftcontent {
width: 225px;
float: left;
background-color: #CCCCCC;
}
#maincontent {
float: left;
width: 600px;
background-color: #FFFFFF;
}