Click here to Skip to main content
15,888,521 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
I am developing a wesbite for which I have horizontal menues but I want to create vertical submenus on mouse hover...

Here problem is that, I have basic knowledge of HTML/CSS, I am ASP.NET developer, For this website I have downloaded a very basic Web Template. There are example online about this but they are not working with the template I have.

Somebody could help me out to create simple hover submenu with my template...

Below is the HTML MENU SNIPPET...

HTML
body {margin:0;padding:0;line-height: 1.5em;background: #fff;font: 76%/160% verdana, arial, helvetica, sans-serif;color: #000;letter-spacing: 1px;}

#header {background-color: #f5f5dc;padding-top: 20px;font-size: 2.2em;font-weight: normal;letter-spacing: 20px;height: 40px;text-align: center;border-bottom: 1px solid #000; color:Orange}

ul#navtop {background-color: #f5f5dc;margin: 0; padding: 10px 0 10px 30px;white-space: nowrap;border-bottom: 1px solid #000;}

/*Navigation Styles*/

#navtop li {display: inline;list-style-type: none;}

#navtop a {padding: 3px 10px;}

#navtop a:link, #navtop a:visited {color: #000;text-decoration: none;border: 1px solid #f5f5dc;outline:none; color:Red}

#navtop a:hover{color: #000;background-color: #f9f9ea;text-decoration: none;border: 1px solid #000;}

.navbottom {margin-left: 0;padding-left: 0;}

#maincontainer {width: 600px;margin: 50px auto;}

#contentwrapper {float: left;width: 100%;}
Posted

1 solution

It's better not to create them, but show and hide on those events; it will make the problem quite trivial. It will also make it possible to have a pure CSS menu. I hope you can do it yourself using this simple idea, but you can use, in particular, the following Web resources:
http://purecss.io/menus[^],
http://cssmenumaker.com[^],
http://css3menu.com[^].

—SA
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900