473,386 Members | 1,715 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,386 software developers and data experts.

sub menu how do i add sub menu to the codes below

Expand|Select|Wrap|Line Numbers
  1. <style type="text/css">.style1
  2.         {
  3.             height: 78px;
  4.             width: 256px;
  5.             float: left;
  6.             position: relative;
  7.             left: -2px;
  8.             top: -1px;
  9.         }
  10.         .style2
  11.         {
  12.             height: 77px;
  13.         }
  14.         table.MsoNormalTable
  15.     {line-height:115%;
  16.     font-size:11.0pt;
  17.     font-family:"Calibri","sans-serif";
  18.     }
  19.     </style>
  20. </head>
  21. <body>
  22. <div id="main">
  23. <div id="header">
  24. <div id="banner"><a href="index.html"><img class="style1" src="http://bytes.com/images/17.jpg" title="Company Logo" /></a></div>
  25.  
  26. <div class="style2" id="menubar">
  27. <ul id="menu">
  28.     <li><a href="index.html" title="Home">Home</a></li>
  29.     <li><a href="About.html" title="About Us">About Us</a></li>
  30.     <li><a href="WhatisCIP.html" title="Citizenship by Investment">Citizenship by Investment</a></li>
  31.     <li><a href="HowtoApply.html" title="How to Apply">How to Apply</a></li>
  32.     <li><a href="Services.html" title="Services">Services</a></li>
  33.     <li><a href="Links.html" title="Links">Links</a></li>
  34.     <li class="last"><a href="ContactUs.html" title="Contact Us">Contact Us</a></li>
  35. </ul>
  36. </div>
Jun 2 '15 #1
3 3988
Expand|Select|Wrap|Line Numbers
  1. <html> 
  2.     <head> <title>Menu with Submenu</title>
  3.          <style type="text/css" media="screen">
  4.          #MENU ul { padding:1; margin:1; list-style:none; font-family: Tw Cen MT; } 
  5.          #MENU li { float:left; position:relative; padding-right:100; display:block; border:4px solid #020202; border-style:inset; }
  6.          #MENU li a { text-decoration:none; }
  7.          #MENU li ul { display:none; position:absolute;}
  8.          #MENU li:hover ul{ display:block; background:#FFD900; height:auto;width:auto;}
  9.          #MENU li ul li{ clear:both; border-style:none;} 
  10.          </style> 
  11.     </head> 
  12.     <body> 
  13.         <div id="MENU"> 
  14.              <li><a href="#">HOME</a></li>
  15.              <li> <a href="#">ABOUT US</a></li> 
  16.  
  17.              <li> <a href="#">SUBJECT OFFERRED</a> 
  18.              <ul> <li><a href="#">ALGEBRA</a></li> 
  19.              <li><a href="#"></a>ACCOUNTING</li> 
  20.              <li><a href="#"></a>CALCULUS</li> 
  21.              <li><a href="#"></a>PHYSICAL EDUCATION</li> </ul> </li>
  22.  
  23.              <li> <a href="#">STUDENT INFORMATION</a> 
  24.              <ul> <li><a href="#">POLICY</a></li>
  25.              <li><a href="#">NEWS AND EVENTS</a></li>
  26.              </ul> 
  27.         </div> 
  28.     </body> 
  29.  </html>

You may use it as a basic reference
hope it helps :)
Jun 3 '15 #2
can it be edited to suit the codes that already exist, and if i use the ones you submitted it will disrupt the formatting on the entire page.

all i would really love is to add a dropdown menu to the menu that already exist.
Jun 4 '15 #3
You have to recheck your coding
I found some faults and check this out:

In line 26 you can use the div id remove the class="style2" you might have a problem in calling the div name and results for confusion.

You can make the submenu for just adding another <ul></ul> inside the menu that requires a submenu like for what I give to you in line 18.

And change your style you to see what you wanted, simple instructions will help you to do it.

Happy Coding :)
Jun 4 '15 #4

Sign in to post your reply or Sign up for a free account.

Similar topics

8
by: Raymond H. | last post by:
Hello, 1- How to see, in a Label, the URL of a link that the mouse pass over? (in the WebBrower control in a vb projet). 2- How to create a menu and a submenu via a button Command1? and...
7
by: johkar | last post by:
I am confused on childNodes or children. When you have nested lists, I would think it would all be one list in the Dom, this doesn't seem to be the case. So how do you traverse an unordered list?...
2
by: Jackson Yap | last post by:
can someone kind enough to help me look at the attached html and js file? Why is it that the javascript menu could not work at www.apchosting.net but could work at...
3
by: Peter Stalder | last post by:
I want to alter a menu bar based on user's actions. My menu bar is established using macros. Is there any way to edit the menu bar macro using Visual Basic, so that the menu name will change. I...
3
by: Sender | last post by:
The contextmenu I have created has many levels. Like on the main level there are 15 menuitems. Then for each 15 menuitems there are at least 2 menuitems and then for each of these menu items there...
2
by: Randy Smith | last post by:
Hi All, I'm having trouble finding a solution to this problem with ASP 2.0. I'm using MasterPages with a menu, and if the number of elements inside a level within the menu is too long, the...
2
by: Gary Wessle | last post by:
Hi I need help organizing this program in the right way. I included the code below which compiles and runs and gives the desired effect to a certain point, but I don't know what the next step...
1
by: Anthony | last post by:
Below is a script I found at http://javascript.internet.com/ for a cascading menu. The script works great but there is one thing that I would like modified. BecauseI am just learning javascript,...
3
by: jaddi1 | last post by:
Hi, I am trying to make a multi-level drop-down menu similar to what is seen here: http://www.cssplay.co.uk/menus/simple_vertical.html. My problem is that some of the menu will be populated from...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.