473,839 Members | 1,504 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

IE7 unwanted behaviour CSS

170 New Member
Hello,

I'm a little out of my depth with this one. There's a top dropdown nav menu which is just a bunch of ul and li etc. The style sheet (below) works perfectly with FF and Safari, but IE7 two things are wrong. (The menu is from Stu Nicholl's site.) I'm on Windows XP.

1) The dropdown part is "transparen t". Is this some sort of z-index problem?
2) IE7 will only dropdown to the 1st sublevel, but no more. If you move the mouse below that to the next link in the set, the menu disappears.

Is anyone able to point me in the right direction please?
Html snippet
Expand|Select|Wrap|Line Numbers
  1. <ul id="nav">
  2.     <li class="top"><a href="index2.php" class="top_link"><span>Home</span></a></li>
  3.     <li class="top"><a href="calendar/mysqlcalindex.php" class="top_link"><span>Calendar</span></a></li>
  4.     <li class="top"><a href="javascript: void(0)" id="classes" class="top_link"><span class="down">Classes</span></a>
  5.         <ul class="sub">
  6.             <li><a href="classnew.php">New</a></li>
  7.             <li><a href="classview.php">View or Edit</a></li>
  8.             <li><a href="javascript: void(0)" class="fly">Usernames to Parents &rsaquo;</a>
  9.                 <ul>
  10.                     <li>
  11. ...etc
  12.  
CSS code
Expand|Select|Wrap|Line Numbers
  1. #nav, 
  2. #nav ul {padding:0 0 5px 0; margin:0; list-style:none; font: 10px verdana, sans-serif; border:1px solid #3a93d2; background:#3a93d2; position:relative; z-index:200;}
  3. #nav {height:25px; padding:0;}
  4.  
  5. #nav li {float:left;}
  6. #nav li li {float:none;}
  7. /* a hack for IE5.x and IE6 */
  8. * html #nav li li {float:left;}
  9.  
  10. #nav li a {display:block; float:left; color:#d8d8d8; margin:0 10px; height:25px; line-height:25px; text-decoration:none; white-space:nowrap;font-weight:bold}
  11. #nav li li a {height:20px; line-height:20px; float:none;}
  12.  
  13. #nav li:hover {position:relative; z-index:300; color:#fff}
  14. #nav li:hover ul {left:0; top:22px;background:white;}
  15. /* another hack for IE5.5 and IE6 */
  16. * html #nav li:hover ul {left:10px;background:white;}
  17.  
  18. #nav ul {position:absolute; left:-9999px; top:-9999px;}
  19. /* yet another hack for IE5.x and IE6 */
  20. * html #nav ul {width:1px;}
  21.  
  22. /* it could have been this simple if all browsers understood */
  23. /* show next level */
  24. #nav li:hover li:hover > ul {left:-15%; margin-left:100%; top:-1px;color:black;background:white;font-weight:bold}
  25. /* keep further levels hidden */
  26. #nav li:hover > ul ul {position:absolute; left:-9999px; top:-9999px; width:auto;color:black;background:white;font-weight:bold}
  27. /* show path followed */
  28. #nav li:hover > a {text-decoration:none;  font-weight:bold;color:white;background:#3a93d2}
  29.  
  30.  
  31. /* but IE5.x and IE6 need this lot to style the flyouts and path followed */
  32. /* show next level */
  33. #nav li:hover li:hover ul,
  34. #nav li:hover li:hover li:hover ul,
  35. #nav li:hover li:hover li:hover li:hover ul,
  36. #nav li:hover li:hover li:hover li:hover li:hover ul
  37. {left:-15%; margin-left:100%; top:-1px;color:black;background:white;font-weight:bold}
  38.  
  39. /* keep further levels hidden */
  40. #nav li:hover ul ul,
  41. #nav li:hover li:hover ul ul,
  42. #nav li:hover li:hover li:hover ul ul,
  43. #nav li:hover li:hover li:hover li:hover ul ul
  44. {position:absolute; left:-9999px; top:-9999px;color:black;background:white;font-weight:bold}
  45.  
  46. /* show path followed */
  47. #nav li:hover a,
  48. #nav li:hover li:hover a,
  49. #nav li:hover li:hover li:hover a,
  50. #nav li:hover li:hover li:hover li:hover a,
  51. #nav li:hover li:hover li:hover li:hover li:hover a,
  52. #nav li:hover li:hover li:hover li:hover li:hover li:hover a
  53. {text-decoration:none;  font-weight:bold;color:white;background:#3a93d2}
  54.  
  55. /* hide futher possible paths */
  56. #nav li:hover li a,
  57. #nav li:hover li:hover li a,
  58. #nav li:hover li:hover li:hover li a,
  59. #nav li:hover li:hover li:hover li:hover li a,
  60. #nav li:hover li:hover li:hover li:hover li:hover li a
  61. {text-decoration:none;  color:black;background:white;font-weight:bold}
  62.  
Jun 2 '08 #1
2 1621
Stang02GT
1,208 Recognized Expert Top Contributor
One thing you have to understand is that each of these browsers render things different then the other. Firefox handles things one way and IE will handle that same thing totally different.

Unfortunately i am unable to provide you with links to resources that can help you, most of with involve the word "hack" and my work blocks all sites containing words like that.

But if you do a google search on CSS IE7 fixes there are loads of articles and information on the issue.

here is one idea that you can attach a different style sheet for IE

http://css-tricks.com/how-to-create-...ly-stylesheet/
Jun 2 '08 #2
beary
170 New Member
One thing you have to understand is that each of these browsers render things different then the other. Firefox handles things one way and IE will handle that same thing totally different.

Unfortunately i am unable to provide you with links to resources that can help you, most of with involve the word "hack" and my work blocks all sites containing words like that.

But if you do a google search on CSS IE7 fixes there are loads of articles and information on the issue.

here is one idea that you can attach a different style sheet for IE

http://css-tricks.com/how-to-create-...ly-stylesheet/

Thankyou Stang02GT for your response, I'll look into it.
Jun 3 '08 #3

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

Similar topics

0
1474
by: JB | last post by:
Hey ppl, I'm experiancing a very weird problem with my current Win32(win2k/XP) application. I'm using: * Delphi 7 * ADO * mySQL ODBC 3.51 drivers
15
2683
by: Vorpal Chortler | last post by:
I've got a web customer complaining about centered text when it's not supposed to be. I just looked over at browsercam and it only appears on Win IE 6 - Nothing else, EVERYTHING else is justified left as it should be. I'm using primitive CSS1 AND tables for the site. The top page is at http://www.geocities.com/brigidregina/index.html The CSS lives at
6
12162
by: Tony T | last post by:
Can anyone help me with this - it may be obvious, but I just can't see it. I'm working with PC and WinME. In IE6, the two divs inside the wrapping div have no space between them, which is how I want it to be, but in NN6.2 and Opera7.11 there's a gap between them. I've tried all the fixes I can think of, but can't get it to work. Any help would be much appreciated. Pared-down example: http://www.tonyturton.com/test/styletest.html...
2
1782
by: heather.memmel | last post by:
I don't know if it was some kind of "upgrade" in a recent Windows SP but, I now have a problem...When ever I have JavaScript open a new window the URL is displayed in the title bar prior to the title, this is really just an aesthetic problem but seems to be fixed if I set the new window property of location to yes, but I then get an ugly url title bar in my new window. Does anyone know how to disable that "feature" or even what I am...
2
1327
by: JohnM | last post by:
Where fields contain text, I've noticed that when they are first opened in a form, all the text is hilighted. How do I avoid this? ... it's not desperately important, but irritating! (I think it may be only memo fields)
4
3329
by: David Beck | last post by:
I donwnload some files for processing every day that have unwanted characters in them. In VB6 I use the InputB to read in the text and the StrConv. vLinesFromFile = StrConv(InputB(LOF(nFileNumGENERIC), nFileNumGENERIC), vbUnicode) If the string has any unwanted characters (e.g. Chr(26)), I use the replace to remove them and save the file.
3
1486
by: DC Gringo | last post by:
I have a panel that's inserting and unwanted <div> tag around it ...how can I disable that? <ASP:PANEL ID="pnlCentralAmerica" RUNAT="server" > <LI CLASS="rightSideBar"> <A HREF='/weather/?pageID=weatherDoc&amp;g=<% = centralAmericaGcId %>' CLASS="secondNav"> <% = centralAmericaDate %><U>C Amer/Haiti</U>:<% = centralAmericaOneliner %></A> </li>
16
2807
by: lovecreatesbeauty | last post by:
/* When should we worry about the unwanted chars in input stream? Can we predicate this kind of behavior and prevent it before debugging and testing? What's the guideline for dealing with it? As shown below line #21, I should remove the unwanted characters in input stream there at that time. Do I miss some other possible errors in i/o which will happen to occur sometimes in other places? And welcome your kind comments on following the...
3
3712
by: Jeff Calico | last post by:
Hello everyone I am transforming an XML document to text, basically only outputting a small portion of it. When I run the following XSLT via Xalan's processor, I get a bunch of unwanted blank lines in the output. Here is a simplified XML and XSLT: (Note the problem does not happen when testing in XMLSpy) - - - - - - - - - - - - - - - - - - - - - - - -
29
3196
by: Marco | last post by:
Hello, I have : float f = 36.09999999; When I do : char cf; sprintf(cf,"%0.03lf", f); I get : 36.100
0
9855
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, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
10909
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
10588
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...
1
10650
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
1
7830
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
7019
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
1
4492
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
4065
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
3
3136
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

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.