www.webdeveloper.com
Results 1 to 2 of 2

Thread: HTML drop downs not working

  1. #1
    Join Date
    Sep 2011
    Posts
    1

    HTML drop downs not working

    Hi

    I am not able to get the drop downs working when i place this code in my application .i have given below m css file and the Html page .When i deploy the css file and html page along witht the csshover3.htc i am able to get the drop downs working properly (horizontally) in ie7 ,firefox. but when i integrate this code in my application i am not able to get the dropdown instead i get the menu in the left of the page vertical .Presently i am using ie7 but i want it to be browser compatible so i am using only html here. Please verify the code below

    CSS

    Code:
    #menu {
    width: 100%;
    background: #eee;
    float: left;
    }
    
    #menu ul {
    list-style: none;
    margin: 0;
    padding: 0;
    float: left;
    }
    
    #small {width: 3em;}
    #medium {width: 5em;}
    #large {width: 8em;}
    
    
    #menu a, #menu h2 {
    font: bold 10px Verdana, Arial, Helvetica, sans-serif;
    display: block;
    border-width: 1px;
    border-style: solid;
    border-color: #ccc #888 #555 #bbb;
    margin: 0;
    padding: 2px 3px;
    }
    
    
    #menu li {position: relative;}
    
    #menu ul ul {
    position: absolute;
    z-index: 500;
    width: 9em;
    }
    
    #menu ul ul ul {
    top: 0;
    left: 100%;
    }
    
    
    div#menu ul ul,
    div#menu ul li:hover ul ul,
    div#menu ul ul li:hover ul ul
    {display: none;}
    
    div#menu ul li:hover ul,
    div#menu ul ul li:hover ul,
    div#menu ul ul ul li:hover ul
    {display: block;}
    
    #menu h2 {
    color: #ddbc36;
    background: #003366;
    text-transform: uppercase;
    }
    
    #menu a {
    color: #000;
    background: #efefef;
    text-decoration: none;
    }
    
    #menu a:hover {
    color: #a00;
    background: #fff;
    }

    HTML


    Code:
    <html>
    <head>
    <LINK href="/css/menu.css" rel="stylesheet" type="text/css">
    <!--[if IE]>
    <style type="text/css" media="screen">
    body {
    behavior: url(css/csshover3.htc);  
    font-size: 100%;
    }
    
    #menu ul li {float: left; width: 100%;}
    #menu ul li a {height: 1%;} 
    
    #menu a, #menu h2 {
    font: bold 0.7em/1.4em arial, helvetica, sans-serif;
    }
    </style>
    <![endif]-->
    </head>
    <body>
    <div id="menu"> 
    
    <ul id="small">
      <li><h2>T</h2>
           <ul>
              <li><a href="../action/T1 ">A1</a></li>
    	  <li><a href="../action/T2=true">A2</a></li>
    	  <li><a href="../action/T3=true">A3</a></li>
    	  <li><a href="../action/T4=InitialPage">A4</a></li>
    	  <li><a  href="../action/T5=InitialPage">A5</a></li>
    	
    	  <li><a href="#S">B</a>
    		<ul>
    		    <li><a href="../action/S1">B1</a></li>
    		    <li><a href="../action/S2">B2</a></li>
    		    <li><a href="../action/S3">B3</a></li>
    		    <li><a href="../action/S4">B4</a></li>
    		    <li><a href="#S">B5        </a>
    				<ul>
    					<li><a href="../action/Messages?listType=CREATE">Create</a></li>
    					<li><a href="../action/Messages?listType=VIEW">View</a></li>
    				</ul>
    		    </li>
    				
    		</ul>
    	  </li>
    
           </ul>
      </li>
    </ul>
    <ul id="medium">
      <li><h2>V</h2>
           <ul>
              <li><a href="../action/V1">C1</a></li>
    	  <li><a href="../action/V2">C2</a></li>
    	  <li><a href="../action/V3">C3</a></li>
    	  <li><a href="#U">C4</a></li>
    	  <li><a  href="../action/U1">D1</a></li>
    	  <li><a  href="../action/U2">D2</a></li>
    	  <li><a href="../action/U3">D3</a></li>
           </ul>
      </li>
    </ul>
    <ul id="medium">
      <li><h2>X</h2>
           <ul>
    				<li><a href="../action/X1">E1</a></li>
    				<li><a href="../action/X2">E2</a></li>
    				<li><a href="../action/X3">E3</a></li>
           </ul>
      </li>
    </ul>
    <ul id="medium">
      <li><h2>ALL OTHER</h2>
           <ul>
    				<li><a href="../action/Y1">F1</a></li>
    				<li><a href="../action/Y2">F2</a></li>
    				      
           </ul>
      </li>
    </ul>
    <ul id="small">
      <li><a href="../action/Z" style="color:#ddbc36;background:#003366;text-transform: uppercase;">G</a></li>
    </ul>
    <ul id="medium">
      <li><h2>V</h2>
           <ul>
    				<li><a href="../action/V1">H1</a></li>
    				<li><a href="../action/V2">H2</a></li>
          </ul>
      </li>
    </ul>
    <ul id="large">
      <li><h2>W</h2>
           <ul>
    				<li><a href="../action/W1">I1</a></li>
    				<li><a href="../action/W2">I2</a></li>
    				<li><a href="../action/W3">I3</a></li>
    				<li><a href="../action/W4">I4</a></li>
    				<li><a href="../action/W5">I5</a></li>
    				<li><a href="../action/W6">I6</a></li>				
    				<li>
    					<a  href="../action/Z">J</a>
    					<ul>
    							<li><a  href="../action/Z1">J1</a></li>
    							<li><a  href="../action/Z2">J2</a></li>
    							<li><a  href="../action/Z3">J3</a></li>
    					</ul>
    				</li>	
           </ul>
      </li>
    </ul>
    <ul id="medium">
      <li><h2>Q</h2>
           <ul>
    				<li><a href="../action/Q1">K1</a></li>
    				<li><a href="../action/Q2">K2</a></li>
           </ul>
      </li>
    </ul>
    <ul id="large">
      <li><h2>P</h2>
           <ul>
    				<li><a href="../action/P1">L1</a></li>
    				<li><a href="../action/P2">L2</a></li>				
           </ul>
      </li>
    </ul>
    <ul id="small">
      <li><a href="#" style="color:#ddbc36;background:#003366;text-transform: uppercase;" onclick='return showTopMenuHelp()'>Help</a></li>
    </ul>
    							
    </div> 
    </body>
    </html>

  2. #2
    Join Date
    Sep 2011
    Location
    India
    Posts
    21
    Hi Sandeep,

    I checked the above code, on firefox and chromes , its working fine, but doesn't work in IE.

    I think the reason is because you are uisng duplicate id (small,large,medium) , which IE is unable to parse. Try changing the Id, and check once.


    Thanks
    Mourya

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Tags for this Thread

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
HTML5 Development Center

"

"

X vBulletin 4.2.2 Debug Information

  • Page Generation 0.11342 seconds
  • Memory Usage 2,853KB
  • Queries Executed 15 (?)
More Information
Template Usage (33):
  • (1)SHOWTHREAD
  • (1)ad_footer_end
  • (1)ad_footer_start
  • (1)ad_global_above_footer
  • (1)ad_global_below_navbar
  • (1)ad_global_header1
  • (1)ad_global_header2
  • (1)ad_navbar_below
  • (1)ad_showthread_firstpost_sig
  • (1)ad_showthread_firstpost_start
  • (1)ad_thread_first_post_content
  • (1)ad_thread_last_post_content
  • (2)bbcode_code
  • (1)footer
  • (1)forumjump
  • (1)forumrules
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (1)headinclude_bottom
  • (2)memberaction_dropdown
  • (1)navbar
  • (4)navbar_link
  • (1)navbar_moderation
  • (1)navbar_noticebit
  • (1)navbar_tabs
  • (2)option
  • (2)postbit
  • (2)postbit_onlinestatus
  • (2)postbit_wrapper
  • (1)spacer_close
  • (1)spacer_open
  • (1)tagbit_wrapper 

Phrase Groups Available (6):
  • global
  • inlinemod
  • postbit
  • posting
  • reputationlevel
  • showthread
Included Files (26):
  • ./showthread.php
  • ./global.php
  • ./includes/class_bootstrap.php
  • ./includes/init.php
  • ./includes/class_core.php
  • ./includes/config.php
  • ./includes/functions.php
  • ./includes/functions_navigation.php
  • ./includes/class_friendly_url.php
  • ./includes/class_hook.php
  • ./includes/class_bootstrap_framework.php
  • ./vb/vb.php
  • ./vb/phrase.php
  • ./includes/functions_facebook.php
  • ./includes/functions_calendar.php
  • ./includes/functions_bigthree.php
  • ./includes/class_postbit.php
  • ./includes/class_bbcode.php
  • ./includes/functions_reputation.php
  • ./includes/functions_notice.php
  • ./packages/vbattach/attach.php
  • ./vb/types.php
  • ./vb/cache.php
  • ./vb/cache/db.php
  • ./vb/cache/observer/db.php
  • ./vb/cache/observer.php 

Hooks Called (73):
  • init_startup
  • friendlyurl_resolve_class
  • init_startup_session_setup_start
  • database_pre_fetch_array
  • database_post_fetch_array
  • init_startup_session_setup_complete
  • global_bootstrap_init_start
  • global_bootstrap_init_complete
  • cache_permissions
  • fetch_postinfo_query
  • fetch_postinfo
  • fetch_threadinfo_query
  • fetch_threadinfo
  • fetch_foruminfo
  • load_show_variables
  • load_forum_show_variables
  • global_state_check
  • global_bootstrap_complete
  • global_start
  • style_fetch
  • global_setup_complete
  • showthread_start
  • showthread_getinfo
  • strip_bbcode
  • friendlyurl_clean_fragment
  • friendlyurl_geturl
  • forumjump
  • cache_templates
  • cache_templates_process
  • template_register_var
  • template_render_output
  • fetch_template_start
  • fetch_template_complete
  • parse_templates
  • fetch_musername
  • notices_check_start
  • notices_noticebit
  • process_templates_complete
  • friendlyurl_redirect_canonical
  • showthread_post_start
  • showthread_query_postids
  • showthread_query
  • bbcode_fetch_tags
  • bbcode_create
  • showthread_postbit_create
  • postbit_factory
  • postbit_display_start
  • postbit_imicons
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • postbit_display_complete
  • memberaction_dropdown
  • tag_fetchbit
  • tag_fetchbit_complete
  • forumrules
  • navbits
  • navbits_complete
  • build_navigation_data
  • build_navigation_array
  • check_navigation_permission
  • process_navigation_links_start
  • process_navigation_links_complete
  • set_navigation_menu_element
  • build_navigation_menudata
  • build_navigation_listdata
  • build_navigation_list
  • set_navigation_tab_main
  • set_navigation_tab_fallback
  • navigation_tab_complete
  • fb_like_button
  • showthread_complete
  • page_templates