473,385 Members | 1,569 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.

IE7 navigation menu won't display right

my navigation menu was okay in Firefox but when i view it in the IE7 the sub menus are aligned on list next to it!

please help

below is my CSS and Juery and html file

Expand|Select|Wrap|Line Numbers
  1. <script type="text/javascript">
  2.  
  3.         $(document).ready(function() {
  4.         $('.myMenu > li').bind('mouseover', openSubMenu);
  5.         $('.myMenu > li').bind('mouseout', closeSubMenu);
  6.         function openSubMenu() {
  7.         $(this).find('ul').css('visibility', 'visible');
  8.         };
  9.         function closeSubMenu() {
  10.         $(this).find('ul').css('visibility', 'hidden');
  11.         };
  12.         });
  13.     </script> 
  14.  
  15.  
  16.  
  17. <!--nav start-->
  18. <div class="container container-2">
  19.   <div class="row row-2">  
  20.       <div class="block display-block nav ">
  21.  
  22.             <div class="search">
  23.                 <div class="searchfield">
  24.                     <div>
  25.                     <label><input type="submit" value="search" class="button-search" /></label>
  26.                     <input type="text" class="search-textfield" />
  27.                     </div>
  28.                 </div>
  29.             </div>
  30.             <ul class="myMenu">
  31.                 <li><a href="#" class="menu1"> menu item 1</a></li>
  32.                 <li><a href="#" class="menu2">menu item 2</a>
  33.                     <ul class="submenu1"> 
  34.                         <li><a href="#">sub menu item 1</a></li> 
  35.                         <li><a href="#">sub menu item 2</a></li> 
  36.                         <li><a href="#">sub menu item 3</a></li> 
  37.                         <li><a href="#">sub menu item 4</a></li>
  38.                     </ul> 
  39.  
  40.                 </li> 
  41.                 <li><a href="#" class="menu3">menu item 3</a> 
  42.                     <ul class="submenu2">
  43.                     <li><a href="#">sub menu item 1</a></li> 
  44.                         <li><a href="#">sub menu item 2</a></li>
  45.                         <li><a href="#">sub menu item 3</a></li>
  46.                         <li><a href="#">sub menu item 4</a></li>
  47.                     </ul> 
  48.                 </li>
  49.  
  50.                 <li><a href="#" class="menu4"></a>
  51.  
  52.                     <ul class="submenu4">
  53.                     <li><a href="#">sub menu item 1</a></li> 
  54.                         <li><a href="#">sub menu item 2</a></li>
  55.                         <li><a href="#">sub menu item 3</a></li>
  56.                         <li><a href="#">sub menu item 4</a></li>
  57.                     </ul> 
  58.  
  59.  
  60.                 </li>
  61.  
  62.                 <li><a href="#" class="menu5"></a>
  63.                     <ul class="submenu5">
  64.                     <li><a href="#">sub menu item 1</a></li> 
  65.                         <li><a href="#">sub menu item 2</a></li>
  66.                         <li><a href="#">sub menu item 3</a></li>
  67.                         <li><a href="#">sub menu item 4</a></li>
  68.                     </ul> 
  69.  
  70.                 </li>
  71.                 <li><a href="#" class="menu6"></a></li>
  72.                 <li><a href="#" class="menu7"></a></li>
  73.  
  74.             </ul>
  75.  
  76.       </div>
  77.   </div>
  78. </div>
  79. <!--nav end-->
Expand|Select|Wrap|Line Numbers
  1. .menu1 { width:106px; height:30px; background:url(../images/listbg.jpg) repeat-x; border-right:1px solid #1e3503;}
  2. .menu2 {clear:left;width:99px; height:30px; background:url(../images/listbg.jpg) repeat-x; border-left:1px solid #465e05; border-right:1px solid #1e3503; }
  3. .menu3 {width:172px; height:30px; background:url(../images/listbg.jpg) repeat-x;border-left:1px solid #465e05; border-right:1px solid #1e3503;}
  4. .menu4 {width:90px; height:30px; background:url(../images/menu4.jpg) no-repeat; border-left:1px solid #465e05; border-right:1px solid #1e3503;}
  5. .menu5 {width:86px; height:30px; background:url(../images/menu5.jpg) no-repeat; border-left:1px solid #465e05; border-right:1px solid #1e3503; }
  6. .menu6 {width:98px; height:30px; background:url(../images/menu6.jpg) no-repeat; border-left:1px solid #465e05; border-right:1px solid #1e3503;}
  7. .menu7 {width:88px; height:30px; background:url(../images/menu7.jpg) no-repeat;}
  8.  
  9.  
  10.  
  11. /*style the main menu*/ 
  12. .myMenu {
  13.     float:left;
  14.     width:752px;
  15.     height:43px;
  16.     margin-top:1px;
  17.        /*background:url(../images/listbg.jpg) repeat-x;*/
  18. }
  19. .myMenu li {
  20.     float: left;
  21.     list-style: none outside none;
  22.     text-align:center;
  23.     height:43px;
  24.     width:auto;
  25. }
  26. .myMenu li a:link, .myMenu li a:visited {
  27.     color: #ebe54e;
  28.     display: block;
  29.     margin: 0;
  30.     text-decoration: none;
  31.     padding-top:13px;
  32.     height:30px;
  33. }
  34. .myMenu li a:hover {
  35.     background-color: #00CCFF;
  36. }
  37.  
  38. /*style the sub menu*/
  39. .myMenu li ul {
  40.     margin-top: 43px;
  41.     padding: 0;
  42.     position: absolute;
  43.     visibility: hidden;
  44.     z-index: 1000;
  45. }
  46.  
  47. .myMenu li ul li {
  48.     display:block;
  49.     float: none;
  50. }
  51. /*fix size of submenus*/
  52. ul.submenu1 li a{width:99px; /*border-left:1px solid #465e05; border-right:1px solid #1e3503; border-bottom:1px solid #1e3503; */ }
  53. ul.submenu2 li a{width:172px; /*border-left:1px solid #465e05; border-right:1px solid #1e3503; border-bottom:1px solid #1e3503; */ }
  54. ul.submenu5 li a{width:86px; /*border-left:1px solid #465e05; border-right:1px solid #1e3503; border-bottom:1px solid #1e3503; */ }
  55. ul.submenu4 li a{width:90px; /*border-left:1px solid #465e05; border-right:1px solid #1e3503; border-bottom:1px solid #1e3503; */ }
  56.  
  57. .myMenu li ul li a:link ,.myMenu li ul li a:visited {
  58.     background-color: #13552d;
  59. }
  60.  
  61. .myMenu li ul li a:hover {
  62.     background-color: #34802f;\
  63. }
Oct 30 '11 #1
1 2153
jagoan
2
Target ALL VERSIONS of IE

Expand|Select|Wrap|Line Numbers
  1.  
  2. <!--[if IE]>
  3.         <link rel="stylesheet" type="text/css" href="all-ie-only.css" />
  4. <![endif]-->
  5.  

Target IE 7 ONLY
Expand|Select|Wrap|Line Numbers
  1.  
  2. <!--[if IE 7]>
  3.         <link rel="stylesheet" type="text/css" href="ie7.css">
  4. <![endif]-->
  5.  
Nov 3 '11 #2

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

Similar topics

22
by: Marek Mand | last post by:
How to create a functional *flexible* UL-menu list <div> <ul> <li><a href=""></li> <li><a href=""></li> <li><a href=""></li> </ul> </div> (working in IE, Mozilla1.6, Opera7 (or maybe even...
1
by: ngoc | last post by:
Hi I want to build dropdown navigation menu. Searching from google gives many commercial programs -> Not easy to choose. And I want to make it myself. Are there any good tutorials to build...
10
by: H.S. | last post by:
Hi, Let me begin by saying that I am not an HTML expert. The most experience I have for HTML authoring is when I made my webpages in my grad studies at my university and some on my home computer...
0
by: Andrew Polo | last post by:
Dear Sirs, I'm using Navigation Menu control on one of my Web Pages (.NET Framework 2.0). Everything is fine as far as I'm not using it within Master Page. If I make my page as a context of Master...
1
by: Arielle | last post by:
I know what I want. That's the first step right? Now the question is... is it possible. Using embedded unordered lists I want to display a horizontal navigation menu with potential sub-menus...
4
by: tburger | last post by:
Hey everyone- This is my first post at The Scripts, but I've used the forums before for other programming issues. Hopefully, someone has some solid styling advice for me. I've now been dealing...
1
by: Homer | last post by:
Hi, I used a template for my first Web application. I made a few changes to the layer thru its css file. The problem that has been vexing me is the vertical spacing for each navigation menu...
1
by: Fabx | last post by:
Hallo, sorry for my english. I want to build a navigation menu with the repeat control, the items of menu are in a table of database. All items of the menu have class="MenuLink", but the...
1
by: Harlan Messinger | last post by:
I'm sure this is covered on the Web, but I can't figure out a sufficiently narrow Google query: Suppose I have a hierarchical website structure Page 1 Page 1a Page 1b Page 1b1 Page 1b2 Page...
1
by: jevic | last post by:
I am having a bit of trouble with the navigation menu on the sample website I am currently creating. The menu fits perfectly when firefox is fully sized but when I resize the browser the menu always...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 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 former...
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: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
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...
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
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...

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.