Jump to content
xisto Community
Sign in to follow this  
CrazyRob

Css Dropdown Menu

Recommended Posts

hi eveyone for my new site i want to create a css dropdown menuthe image has what the menu needs to look like.but beneth all the links when you need to click on them another set needs to dropdown how can i achieve this.

Share this post


Link to post
Share on other sites

tose menues are more along the lines of what i need. i dont rely know css i know simple commands but not a lot.

I see. Well, maybe i can do a "quicky" of what you need and post back later. Though, no promises. :)
[hr=noshade]
Edit:

Ok, i managed to pull off what i think is what you want.

Here's the CSS for it:
.main {list-style: none;}.main li:before {content: " > ";}.nest {list-style: none;font-style: italic;padding-left: 20px;}.nest li:before {content: " - ";}ul.nest {display: none;}ul.main li:hover ul.nest {display: block;}

And here's the HTML for the list:
<ul class="main"><li>Web Design<ul class="nest"><li>Reseller</li><li>Shared</li></ul></li><li>Website Design</li><li>56k Dial-Up Internet<ul class="nest"><li>Information</li></ul></li><li>Domain Registration</li><li>Merchant Accounts</li><li>Reseller Program</li></ul>

[/hr]

Share this post


Link to post
Share on other sites

ok thanks that helped bu after testing it i found that having it drop donw directly under was not rely nav frendly. how do i now hav the menu so that when you click on a menu the sub menu comes out to the right?

Share this post


Link to post
Share on other sites

Remove:

ul.nest {display: none;}ul.main li:hover ul.nest {display: block;}
from the CSS.

Add:
<script type="text/javascript" language="javascript">//<![CDATA[function dd(id){ if (document.getElementById){ obj = document.getElementById(id); if (obj.style.display == "none"){ obj.style.display = "block"; } else { obj.style.display = "none"; }}}//]]></script>
in the HEAD tag.

and replace the previous list with this one:
<ul class="main">
<li><a href="java script: dd('nest1');">Web Design</a>

<ul style="display: none;" class="nest" id="nest1">
<li>Reseller</li>
<li>Shared</li>
</ul>

</li>
<li>Website Design</li>
<li><a href="java script: dd('nest2');">56k Dial-Up Internet</a>

<ul style="display: none;" class="nest" id="nest2">
<li>Information</li>
</ul>

</li>
<li>Domain Registration</li>
<li>Merchant Accounts</li>
<li>Reseller Program</li>
</ul>


Share this post


Link to post
Share on other sites

The thing is, when i inserted "javascript", it got outputted as "java script". Just remove the space inbetween. Must be a security feature for the forum.

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
Sign in to follow this  

×
×
  • Create New...

Important Information

Terms of Use | Privacy Policy | Guidelines | We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.