473,804 Members | 3,744 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Menu Problem in IE for CSS stylesheet

63 New Member
HI all

I got a problem with my menu display.I am making a list as shown below in one of my aspx pages. And added a stylesheet in CSS for it.
This is not working in IE but not in Mozilla Firefox it is working.
Can anyone please help me with this?

Just after the page html I pasted my CSS stylesheet code also.

_______________ _______________ _______________ _______________ ______

Page
_____

Expand|Select|Wrap|Line Numbers
  1. <%@ Page Language="VB" MasterPageFile="~/SalesMasterPage.master" AutoEventWireup="false" CodeFile="BasestyleTest.aspx.vb" Inherits="BasestyleTest" title="Untitled Page" %>
  2. <asp:Content ID="Content1" ContentPlaceHolderID="ContentPlaceHolder1" Runat="Server">
  3. <form id="test" onclick="hoverer();" action="BasestyleTest.aspx" >
  4. <script type="text/JavaScript">
  5. function hoverer(ulname) {
  6. if (document.all && document.getElementById(ulname).currentStyle ) {
  7. var navroot = document.getElementById(ulname);
  8. var lis=navroot.getElementsByTagName("li");
  9. for (i=0; i<lis.length; i++) {
  10. var oldClassName = this.className;
  11. lis[i].onmouseover=function() {this.className = ulname + "ie";}
  12. lis[i].onmouseout=function() {this.className = oldClassName;}
  13. }
  14. }
  15. }
  16. </script>
  17.  
  18. <ul>
  19.   <li>Reference File maintainence
  20.     <ul>
  21.       <li><a href="">Standard Maintainence</a></li>
  22.       <li><a href="">Temper Maintainence</a></li>
  23.       <li><a href="">Test Certificate Maintainenece</a></li>
  24.       <li><a href="">Export/Domestic Code Maintainence</a></li>
  25.     </ul>
  26.   </li>
  27.   <li>Order/Sample
  28.     <ul>
  29.       <li><a href="">Sales Contract</a></li>
  30.       <li><a href="">Mill Order/Enquiry Maintainence</a></li>
  31.       <li><a href="">Mill order No. By Cust Order No.</a></li>
  32.     </ul>
  33.   </li>
  34.  
  35.   <li>Invoice Shipping
  36.     <ul>
  37.       <li><a href="">Invoice Document Maintainence</a>
  38.                 <ul >
  39.                     <li >
  40.                         <a href="testChild.aspx">Invoice Header Maintainenece 1</a>
  41.                         <a href="testChild.aspx">Invoice Header Maintainenece 2</a>
  42.                         <a href="testChild.aspx">Invoice Header Maintainenece 3</a>
  43.                     </li>
  44.                 </ul> 
  45.        </li>
  46.       <li><a href="">Shipping Maintainence Document</a></li>
  47.       <li><a href="">Provisional Invoice Document Maintainence</a></li>
  48.     </ul>
  49.   </li>
  50. </ul>
  51. </form>   
  52. </asp:Content>
_______________ _______________ _______________ _______________ ______

CSS Style Sheet


Expand|Select|Wrap|Line Numbers
  1. BODY    
  2. {
  3.     background: #FFFFD8;
  4. }
  5. A:link
  6. {
  7.     color: #400080;
  8.     background: #FFFFD8
  9. }
  10. /* Unorderd list and list styles specially for menu dropdowns 
  11.  
  12. ul {
  13.     margin: 0;
  14.     padding: 0;
  15.     list-style: none;
  16.     width: 150px;
  17.     }
  18.  
  19. ul li {
  20.     position: relative;
  21.     }
  22. li ul {
  23.     position: absolute;
  24.     left: 149px;
  25.     top: 0;
  26.     display: none;
  27.     }
  28. ul li a {
  29.     display: block;
  30.     text-decoration: none;
  31.     color: #777;
  32.     background: #fff;
  33.     padding: 5px;
  34.     border: 1px solid #ccc;
  35.     border-bottom: 0;
  36.     }
  37. ul {
  38.     margin: 0;
  39.     padding: 0;
  40.     list-style: none;
  41.     width: 150px;
  42.     border-bottom: 1px solid #ccc;
  43.     }
  44. li:hover ul
  45.     { 
  46.       display: block; 
  47.     }
  48. /*---------- TILL NOW TRIAL GOOD ONE BEGIN ----------*/
  49. /* This is for aranging horizontally */
  50.  
  51. ul {
  52.   padding: 0;
  53.   margin: 0;
  54.   list-style: none;
  55.   }
  56.  
  57.   li {
  58.   float: left;
  59.   position: relative;
  60.   width: 16em;
  61.   font-size:small;  
  62.   }
  63.  
  64.   li ul {
  65.   display: none;
  66.   position: relative ;
  67.   top: 1em;
  68.   left: 0;
  69.   }
  70.  
  71.   ul li {
  72.     position: relative;
  73.     }
  74.  
  75.  
  76. li ul li ul {
  77.     position: absolute;
  78.     left: 15em;
  79.     top: 0;
  80.     display: none;
  81.     visibility :hidden; 
  82.     }
  83.  
  84. /*li ul li ul a:hover{display: block;}*/
  85.  
  86.  
  87. li > ul {
  88.     top: auto;
  89.     left: auto;
  90.  
  91.     }
  92. /*li:hover ul
  93.     display: block; 
  94. }*/
  95. li:hover ul, li.over ul{ display: block; }
  96.  
  97. li ul li:hover ul
  98.     visibility:visible ; 
  99. }
  100. li:hover li 
  101. {
  102.     background-color:#DDFFCC;
  103. }
  104.  
  105. a
  106. {
  107.     text-decoration:none;
  108.     color:Fuchsia ;
  109. }
  110. a:hover { color: Blue;}
  111. /*Testing set*/
  112. li ul li ul {
  113.     position: absolute;
  114.     left: 15em;
  115.     top: 0;
  116.     display: none;
  117.     }
  118.  
  119. /*---------- TILL NOW TRIAL GOOD ONE BEGIN ----------*/
  120. /*----------*/
  121.  
  122.  
  123. /* TEST FOR IE */
  124. /*
  125. ul#nav
  126. {
  127. margin: 0;
  128. padding: 0;
  129. list-style: none;
  130. position: relative;
  131. height: 100px;
  132. }
  133.  
  134. ul#nav li { float: left; display: block; padding-right: 10px;}
  135.  
  136. ul li a {
  137.  
  138. text-decoration: none;
  139. color: #777;
  140. background: #fff;
  141. padding: 5px 15px;
  142.  
  143. background-color: #fff;
  144. width: 100px;
  145. }
  146.  
  147. ul li a:hover {color: #CC3366; background: #eeeeee;}
  148.  
  149. li ul { display: none; list-style: none;}
  150.  
  151. li:hover ul#abt, li.over ul#abt
  152. { display: block; position: absolute; top: 23px; left: 69px; margin: 0px; padding: 0px;}
  153.  
  154. li:hover ul#ser, li.over ul#ser
  155. { display: block; position: absolute; top: 23px; left: 130px; margin: 0px; padding: 0px;}

If someone gets any idea pls help me.

Paulson
Apr 2 '08 #1
2 1542
Paulson
63 New Member
Hi all,

I did not try but I think gving the js file like this will help in your part page
Expand|Select|Wrap|Line Numbers
  1. <script type="text/javascript" language="JavaScript1.2">
  2.     <!--#include virtual="iehover.js"-->
  3.     </script>
Paulson
Apr 2 '08 #2
Death Slaught
1,137 Top Contributor
Could you please be ever so slightly more specific in what your problem is? Is your CSS stylesheet not working, only certain rules, or properties are working, or is it something else?

Thanks, Death
Apr 2 '08 #3

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

Similar topics

2
4689
by: Rob McLennan - ZETLAND | last post by:
Hi, I have set up an external stylesheet, named "print.css", to format the style of all pages printed from my company's website. I've been previewing my changes to the stylesheet by doing File\Print Preview in IE6 and noticed that occasionally the leftmost button of the javascript menu (CoolMenus Version 3.02) on our website is printed. (I have wrapped the javascript that generates this menu in a DIV so that it is concealed from...
8
3253
by: Rob McLennan - ZETLAND | last post by:
Hi, I have set up an external stylesheet, named "print.css", to format the style of all pages printed from my company's website. I've been previewing my changes to the stylesheet by doing File\Print Preview in IE6 and noticed that occasionally the leftmost button of the javascript menu (CoolMenus Version 3.02) on our website is printed. (I have wrapped the javascript that generates this menu in a DIV so that it is concealed from...
2
2765
by: Calvin KD | last post by:
Hi everyone, Can someone show me or point me in the right direction as how to create a "dropdown menu" which displays the menu items as a separete layer over the top of the contents of the page below it. In classic ASP, I used xml, xsl, css and htc to render the menu (with frames). Now in .NET I don't know how to replicate the menu. Menu.xml looks like <?xml version="1.0" encoding="utf-8" ?> <Menu menuText="Click here to access this...
4
19115
by: snowweb | last post by:
I am trying to implement a CSS hierarchical unfolding menu on a site. The thing is, it needs to be dynamically populated from the results of a database query. I previously had the menu working but then it was ‘hard coded’ and not built on the fly. Menu description: 2 top level items “Company” and “Products” (we will ignore “Company” since it is still hard coded and not causing a problem. Below “Products” we have hard coded “By...
6
5118
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. Spent 2 weeks updating my website, put it up, **using the alternative** css sheet, and pfft, IE 6.0 can't see the side menu items as hyperlinks. Right now it's up as www.simi-therapy.com . The CSS sheet I'd like to use is at...
0
4544
by: Carlos Albert | last post by:
Hello world, I'm trying to populate an ASP.NET 2 menu control, but so far no luck. The first problem I find is that they are for C#... and I work using VB. Tried this way: http://aspalliance.com/822 , translating the code (that I post at the end of the msj) but all I got is a menu with two items level 1 that says "MenuItem". Nothing else. And tried to use this
4
3981
by: cathy | last post by:
Hi All, I am having problems displaying content relevant to the option selected in a drop-down menu. I have an xml document which is running content through Flash and I need to have the same content on a web page. I am working in Dreamweaver 8 and code in asp.net (vb). I need to have a drop-down menu listing available news articles, when one is selected the article should appear on the page. I have currently managed to populate the...
6
3060
by: dragze | last post by:
Hi, right i have a menu box wich allows the user to change what stylesheet the website uses. Now this all works just the way it shud in FF, but not in safari or IE, when u select ur option from the box in safari or IE it does nothing. I have tested the same method but with hyperlinks rather than the menu box, this works with all three browsers, just wont wrk on the menu box for some reason. For all i know there could be a simple explanation to...
2
2286
by: Ravi Joshi | last post by:
The menu on my site works fine in IE6 and Firefox. In IE7, there is a problem with the menu: when you mouse over the various main catagories, the sub-catagories all appear to the right as they should; however, as soon as you mouse towards any but the TOP sub-catagory, all those sub-catagories still view there. It will work first time quite fine..but if user clicks outsite anywhere in screen then this problem occur.. i think it's css...
2
3512
by: namratha247 | last post by:
Hi, Can anybody please help me with this problem. In my application, I'm using Menus. and the CSS for the menu is as given below ccMenu.css /* Root = Horizontal, Secondary = Vertical */ ul#navmenu {
0
9577
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 effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
10569
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, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
0
10325
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
0
10075
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
0
9140
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
1
7615
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
5651
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
4295
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
2
3815
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.

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.