Click to See Complete Forum and Search --> : css menu help


esthera
08-13-2006, 12:50 AM
I use the code taken from http://alistapart.com/articles/horizdropdowns

the problem is teh styles change all teh lists to that format and I only want to change the lists that are in the div with id of categorymenu

here's my edited css -- can someone help me with what i did wrong? it works if I take off the #categorymenu from the front of css but then it formats all lists on my page which is not what i want

#categorymenu ul {
margin: 0;
padding: 0;
list-style: none;
width: 150px; /* Width of Menu Items */
border-bottom: 1px solid #ccc;
}

#categorymenu ul li {
position: relative;
}

#categorymenu li ul {
position: absolute;
left: 149px; /* Set 1px less than menu width */
top: 0;
display: none;
}

/* Styles for Menu Items */
#categorymenu ul li a {
display: block;
text-decoration: none;
color: #777;
background: #fff; /* IE6 Bug */
padding: 5px;
border: 1px solid #ccc;
border-bottom: 0;
}

/* Fix IE. Hide from IE Mac \*/
* html #categorymenu ul li { float: left; height: 1%; }
* html #categorymenu ul li a { height: 1%; }
/* End */

#categorymenu ul li a:hover { color: #E2144A; background: #f9f9f9; } /* Hover Styles */

#categorymenu li ul li a { padding: 2px 5px; } /* Sub Menu Styles */

#categorymenu li:hover ul, li.over ul { display: block; } /* The magic */

Kravvitz
08-14-2006, 01:49 AM
#categorymenu li:hover ul, li.over ul
should be
#categorymenu li:hover ul, #categorymenu li.over ul
If that doesn't fix it we will need to see more of your code.

Wiz Creations
08-14-2006, 02:22 AM
If that doesn't fix it we will need to see more of your code.
If you need to post more, include the HTML. (I believe that is what Kravvitz is referring to.)