/    Sign up×
Community /Pin to ProfileBookmark

css menu help

I use the code taken from [url]http://alistapart.com/articles/horizdropdowns[/url]

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 */

to post a comment
CSS

2 Comments(s)

Copy linkTweet thisAlerts:
@KravvitzAug 14.2006 — #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.
Copy linkTweet thisAlerts:
@Wiz_CreationsAug 14.2006 — 
If that doesn't fix it we will need to see more of your code.[/QUOTE]

If you need to post more, include the HTML. (I believe that is what Kravvitz is referring to.)
×

Success!

Help @esthera spread the word by sharing this article on Twitter...

Tweet This
Sign in
Forgot password?
Sign in with TwitchSign in with GithubCreate Account
about: ({
version: 0.1.9 BETA 5.6,
whats_new: community page,
up_next: more Davinci•003 tasks,
coming_soon: events calendar,
social: @webDeveloperHQ
});

legal: ({
terms: of use,
privacy: policy
});
changelog: (
version: 0.1.9,
notes: added community page

version: 0.1.8,
notes: added Davinci•003

version: 0.1.7,
notes: upvote answers to bounties

version: 0.1.6,
notes: article editor refresh
)...
recent_tips: (
tipper: @Yussuf4331,
tipped: article
amount: 1000 SATS,

tipper: @darkwebsites540,
tipped: article
amount: 10 SATS,

tipper: @Samric24,
tipped: article
amount: 1000 SATS,
)...