473,385 Members | 1,798 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,385 software developers and data experts.

Why does CSS menu not work in IE?

This is my HTML file
Expand|Select|Wrap|Line Numbers
  1. <html>
  2. <head>
  3.  
  4. <style type="text/css">
  5. @import url(menu.css);
  6. </style>
  7. <!--[if IE]>
  8.  
  9.  
  10. <![endif]-->
  11. </head>
  12. <body>
  13. <!-- start menu HTML -->
  14. <div id="menu">
  15. <ul>
  16.   <li><h2>HOME</h2>
  17.   </li>
  18. </ul>
  19.  
  20. <ul>
  21.   <li><h2>ABOUT US</h2>
  22.     <ul>
  23.       <li><a href="#" title="">MISSION</a> </li>
  24.       <li><a href="#" title="">VISION</a></li>
  25.       <li><a href="#" title="">IDEOLOGY</a></li>
  26.       <li><a href="#" title="">HISTORY</a> </li>
  27.       <li><a href="#" title="">ADMINISTRATION</a></li>
  28.  
  29.  
  30.     </ul>
  31.   </li>
  32. </ul>
  33.  
  34. <ul>
  35.  
  36.   <li><h2>COURSE OFFERED </h2>
  37.     <ul>
  38.       <li><a href="#" title="">GRADUATE</a></li>
  39.                <ul>
  40.  
  41.               <li><a href="#" title="">BCOM</a></li>
  42.               <li><a href="#" title="">BSC</a></li>        
  43.               <li><a href="#" title="">BCA</a></li>
  44.              </ul>
  45.  
  46.       <li><a href="#" title="">POST GRADUATE</a>
  47.         <ul>
  48.           <li><a href="#" title="Vertical Menu Tutorial">tanfa Tutorial</a>    
  49.             <ul>
  50.  
  51.               <li><a href="#" title="">MCA</a></li>
  52.               <li><a href="#" title="">MBA</a></li>        
  53.               <li><a href="#" title="">MCOM</a></li>
  54.               <li><a href="#" title="">MMS</a></li>
  55.  
  56.             </ul>
  57.  
  58.           </li>
  59.         </ul>
  60.       </li>
  61.     </ul>
  62.   </li>
  63. </ul>
  64.  
  65. <ul>
  66.   <li><h2>LIFE ON CAMPUS</h2>
  67.  
  68.     <ul>
  69.       <li><a href="#" title="" </a>EXTRA CURCULUM</li>
  70.       <li><a href="#">INNOVATION</a></li>
  71.     <li><a href="#">STUDENT FORUM</a></li>    
  72.     <li><a href="#">COMPUS DISCRIPTION</a></li>  
  73.  
  74.     </ul>
  75.   </li>
  76. </ul>
  77.  
  78. </div>
  79. </body>
  80. <html>


This is my CSS File
Expand|Select|Wrap|Line Numbers
  1. #menu {
  2. width: 100%;
  3. background: #eee;
  4. float: left;
  5. }
  6.  
  7. #menu ul {
  8. list-style: none;
  9. margin: 0;
  10. padding: 0;
  11. width: 12em;
  12. float: left;
  13. }
  14.  
  15. #menu a, #menu h2 {
  16. font: bold 11px/16px arial, helvetica, sans-serif;
  17. display: block;
  18. border-width: 1px;
  19. border-style: solid;
  20. border-color: #ccc #888 #555 #bbb;
  21. margin: 0;
  22. padding: 2px 3px;
  23. }
  24.  
  25. #menu h2 {
  26. color: #fff;
  27. background: #000;
  28. text-transform: uppercase;
  29. }
  30.  
  31. #menu a {
  32. color: #000;
  33. background: #efefef;
  34. text-decoration: none;
  35. }
  36.  
  37. #menu a:hover {
  38. color: #a00;
  39. background: #fff;
  40. }
  41.  
  42. #menu li {position: relative;}
  43.  
  44. #menu ul ul {
  45. position: absolute;
  46. z-index: 500;
  47. }
  48.  
  49. #menu ul ul ul {
  50. position: absolute;
  51. top: 0;
  52. left: 100%;
  53. }
  54.  
  55. div#menu ul ul {
  56. display: none;
  57. }
  58.  
  59. div#menu ul ul,
  60. div#menu ul li:hover ul ul,
  61. div#menu ul ul li:hover ul ul
  62. {display: none;}
  63.  
  64. div#menu ul li:hover ul,
  65. div#menu ul ul li:hover ul,
  66. div#menu ul ul ul li:hover ul
  67. {display: block;}
this working properly in other browser bt nt in IE.. what is the problem and hw can i fix it...
Jan 22 '11 #1
4 2067
drhowarddrfine
7,435 Expert 4TB
Without a doctype, you will never get IE to attempt to perform like the other far more modern browsers. Add this to your first line: <!doctype html>
Jan 22 '11 #2
tried no change. thanks 4 d reply
Jan 22 '11 #3
drhowarddrfine
7,435 Expert 4TB
This works in IE for me. Specifically what do you see that doesn't work?
Jan 22 '11 #4
the effects that i hav give to the menu.. its not popping out. Just the root item are been displayed but the when my mouse is over those element the sub-menu are not been displayed.
Jan 23 '11 #5

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

Similar topics

6
by: Deborah | last post by:
I'm a rookie, and I guess I know just enough to be dangerous. I found a great template website, openwebsign.org, and found an open source template I really liked that even came in 2 versions. ...
1
by: dkimbrell | last post by:
Hi there, I'm very novice to web design. I'm trying to make a pulldown menu, but the formatting keeps getting screwed up when you roll the mouse over it. Please see www.boundarysys.com for...
1
by: leicklda | last post by:
Hi there, I'm very novice to web design. I'm trying to make a pulldown menu, but the formatting keeps getting screwed up when you roll the mouse over it. Please see www.boundarysys.com for...
1
by: Miaaa Mukherjee | last post by:
Hello, I have created three different menu controls. 1)headercontrol.aspx(which contains mainimage heading and midmenu) 2)leftmenu.aspx(which contains the menu thru which we can open diff...
3
by: Mike | last post by:
I have made a menu bar with CSS and it works perfectly with IE. But it's *way* off in FF. I have fiddled with it for quite some time and can't get it to cooperate. Can anyone help? ...
5
by: saytri | last post by:
Hi i have this project were i have to do a quiz. i wrote the questions in a textfile and i called them through java. I have also made a menu to choose which type of quiz. But before accessing the...
0
by: hitencontractor | last post by:
I am working on .NET Version 2003 making an SDI application that calls MS Excel 2003. I added a menu item called "MyApp Help" in the end of the menu bar to show Help-> About. The application...
6
by: nigelesquire | last post by:
Hi, I have the following code working great in Firefox but not IE. Please help... <html> <head>
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: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
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: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
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
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
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.