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

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • columbus77
    New Member
    • Jun 2015
    • 2

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

    Code:
    <style type="text/css">.style1
            {
                height: 78px;
                width: 256px;
                float: left;
                position: relative;
                left: -2px;
                top: -1px;
            }
            .style2
            {
                height: 77px;
            }
            table.MsoNormalTable
    	{line-height:115%;
    	font-size:11.0pt;
    	font-family:"Calibri","sans-serif";
    	}
    	</style>
    </head>
    <body>
    <div id="main">
    <div id="header">
    <div id="banner"><a href="index.html"><img class="style1" src="http://bytes.com/images/17.jpg" title="Company Logo" /></a></div>
    
    <div class="style2" id="menubar">
    <ul id="menu">
    	<li><a href="index.html" title="Home">Home</a></li>
    	<li><a href="About.html" title="About Us">About Us</a></li>
    	<li><a href="WhatisCIP.html" title="Citizenship by Investment">Citizenship by Investment</a></li>
    	<li><a href="HowtoApply.html" title="How to Apply">How to Apply</a></li>
    	<li><a href="Services.html" title="Services">Services</a></li>
    	<li><a href="Links.html" title="Links">Links</a></li>
    	<li class="last"><a href="ContactUs.html" title="Contact Us">Contact Us</a></li>
    </ul>
    </div>
    Last edited by Rabbit; Jun 2 '15, 07:15 PM. Reason: Please use [code] and [/code] tags when posting code or formatted data.
  • weboutgateway
    New Member
    • Sep 2014
    • 23

    #2
    Code:
    <html> 
    	<head> <title>Menu with Submenu</title>
    		 <style type="text/css" media="screen">
    		 #MENU ul { padding:1; margin:1; list-style:none; font-family: Tw Cen MT; } 
    		 #MENU li { float:left; position:relative; padding-right:100; display:block; border:4px solid #020202; border-style:inset; }
    		 #MENU li a { text-decoration:none; }
    		 #MENU li ul { display:none; position:absolute;}
    		 #MENU li:hover ul{ display:block; background:#FFD900; height:auto;width:auto;}
    		 #MENU li ul li{ clear:both; border-style:none;} 
    		 </style> 
    	</head> 
    	<body> 
    		<div id="MENU"> 
    			 <li><a href="#">HOME</a></li>
    			 <li> <a href="#">ABOUT US</a></li> 
    
    			 <li> <a href="#">SUBJECT OFFERRED</a> 
    			 <ul> <li><a href="#">ALGEBRA</a></li> 
    			 <li><a href="#"></a>ACCOUNTING</li> 
    			 <li><a href="#"></a>CALCULUS</li> 
    			 <li><a href="#"></a>PHYSICAL EDUCATION</li> </ul> </li>
    			 
    			 <li> <a href="#">STUDENT INFORMATION</a> 
    			 <ul> <li><a href="#">POLICY</a></li>
    			 <li><a href="#">NEWS AND EVENTS</a></li>
    			 </ul> 
    		</div> 
    	</body> 
     </html>

    You may use it as a basic reference
    hope it helps :)

    Comment

    • columbus77
      New Member
      • Jun 2015
      • 2

      #3
      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.

      Comment

      • weboutgateway
        New Member
        • Sep 2014
        • 23

        #4
        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 :)

        Comment

        Working...