SOLVED: Another disappearing menu issue w/ IE6 & 7

For discussion and questions related to CMS Specific templates and stylesheets (CSS), and themes. or layout issues. This is not a place for generic "I don't know CSS issues"
tpullano
Forum Members
Forum Members
Posts: 15
Joined: Sun Feb 07, 2010 2:50 pm

SOLVED: Another disappearing menu issue w/ IE6 & 7

Post by tpullano »

Hi all...

After going through all the related posts about the above here, I am at my wits end with trying to figure this out (losing time, hair and sleep).

I am unable to click any level 2 horizontal menus in IE6/7. Looks and works great in IE8 and FF, but in the others the menus will disappear once try to nav to them (it seems to happen once the menus cascade over the content, and they even hide behind a pic I have in the left (news) column...See here: testsite).  The opacity is not working right, and the menu drops below the solid line (the IE7 hack for bottom margin does not seem to work), but not worried about that at this point, just being able to click sub-menus to start.

Using the standard "accessible_cssmenu.tpl" (the cssmenu.tpl does the same thing) in MenuManager, a mod of the Navigation: CSSMenu - Horizontal sytlesheet

Tried adding these to the stylesheet (you will see these about the middle of the below included CSS:
*:first-child+html #ID or .class {
  ie7
}
#primary-nav li, #primary-nav li.menuparent {
  min-height:1em; /* Fixes IE7 bug*/
}

And also tried the dhtml.js script spoken about. I noticed these two sites listed in some of the similar post are working fine, but cannot seem to see what they are doing differently (working site1 & workingsite2). And from another post, the menus on http://multiintech.com/ work in IE7.  Sorry for the long post, but wanted to include everything in the first shot for all to review. Thanks much for any help in advance.

-----------------------------------------
Portion of template (showing some of the section thru the menu call):
{literal}

=b){nw=b+"px";}if(w

   
   
   #pagewrapper {width:expression(P7_MinMaxW(720,950));}
   #container {height: 1%;}
   
   
 {/literal}
{* The min and max page width for Internet Explorer is set here. For other browsers it's in the stylesheet "Layout: Top menu + 2 columns" *}

   
   
   
{* The above JavaScript is required for CSSMenu to work in IE *}



#primary-nav li {margin-bottom: -3px;}
#primary-nav li:hover {margin-bottom:-3px;}




 
   

{* start accessibility skip links, anything with the class of accessibility is hidden with CSS from visual browsers *}
     
       {anchor anchor='menu_vert' title='Skip to navigation' accesskey='n' text='Skip to navigation'}
       {anchor anchor='main' title='Skip to content' accesskey='s' text='Skip to content'}
     
{* end accessibility skip links *}

     
{* Horizontal ruler that is hidden for visual browsers by CSS *}











 
   
     
       {cms_selflink dir="start"}
     
         
           
         
         
           Search
         
     
       Elevator Engineering, Design, Modernization and Consulting

     
   
   {menu template='accessible_cssmenu.tpl'}
CSS (a slight mod of the Navigation: CSSMenu - Horizontal stylesheet):
/* by Alexander Endresen and mark and Nuno */
#menu_vert {
/* no margin/padding so it fills the whole div */
 margin: 0;
 padding: 0;
}

.clearb {
/* needed for some browsers */
/*  clear: both; */
}

#menuwrapper {
 position: absolute;
 top: 87px;
 width: 754px;
 margin: 8px 3px 0px 5px;
 height: 26px;
/* set the background color for the menu here */
/*  background-color: #009999;*/
/* IE6 Hack */
 height: 1%; */
 width: auto; */
/* one border at the top
   border-top: 3px solid #3F565C;
   margin: 0;
   padding: 0;*/
}

ul#primary-nav, ul#primary-nav ul {
/* remove any default bullets */
 list-style-type: none;
 margin: 0;
 padding: 0;
}

ul#primary-nav {
/* pushes the menu div up to give room above for background color to show */
 padding-top: 67px;
/* keeps the first menu item off the left side */
 padding-left: 0px;
}

ul#primary-nav ul {
/* make the ul stay in place so when we hover it lets the drops go over the content below else it will push everything below out of the way */
 position: absolute;
/* top being the bottom of the li it comes out of */
 top: auto;
/* keeps it hidden till hover event */
 display: none;
/* same size but different color for each border */
 border-top: 1px solid #000000;
 border-right: 1px solid #000000;
 border-bottom: 1px solid #000000;
 border-left: 1px solid #000000;
}

ul#primary-nav ul ul {
/* now we move the next level ul down from the top a little for distinction */
 margin-top: 1px;
/* pull it in on the left, helps us not lose the hover effect when going to next level */
 margin-left: -1px;
/* keeps the left side of this ul on the right side of the one it came out of */
 left: 100%;
/* sets the top of it inline with the li it came out of */
 top: 0px;
}

ul#primary-nav li {
/* floating left will set menu items to line up left to right else they will stack top to bottom */
 float: left;
/* no margin/padding keeps them next to each other, the padding will be in the "a" */
 margin-bottom: -1px;
 padding: 0px;
}


*:first-child+html #ID or .class {
  ie7
}

#primary-nav li, #primary-nav li.menuparent {
  min-height:1em; /* Fixes IE7 bug*/
}


#primary-nav li li {
/* Set the width of the menu elements at second level. Leaving first level flexible. */
 width: 220px;
/* removes any left margin it may have picked up from the first li */
 margin-left: 0px;
/* keeps them tight to the one above, no missed hovers */
 margin-top: -1px;
 margin-bottom: -1px;
/* removes the left float set in first li so these will stack from top down */
 float: none;
/* relative to the ul they are in */
 position: relative;
}
/* set the "a" link look here */

ul#primary-nav li a {
/* specific font size, this could be larger or smaller than default font size */
 font-size: 1.2em;
/* make sure we keep the font normal */
 font-weight: Bold;
/* set default link colors */
 color: #000;
/* pushes out from the text, sort of like making links a certain size, if you give them a set width and/or height you may limit you ability to have as much text as you need */
 padding: 12px 15px 15px;
 display: block;
/* sets no underline on links */
 text-decoration: none;
}

ul#primary-nav li a:hover {
/* kind of obvious */
 background-color: #009999;
 color: #fff
}

ul#primary-nav li li a:hover {
/* this is set to #000, black, below so hover will be white text */
 color: #fff;
}

ul#primary-nav li a.menuactive {
 color: #000;
/* bold to set it off from non active */
 font-weight: bold;
/* set your image here */
 background-color: #009999;
}

ul#primary-nav li a.menuactive:hover {
 color: #000;
/* keep it the same */
 font-weight: bold;
}

#primary-nav li li a.menuparent span {
/* makes it hold a shape */
 display: block;
/* set your image here, right arrow, 98% over from the left, 100% or 'right' puts it to far */
 background: url(uploads/ngrey/parent.png) no-repeat 90% center;
}
/* gif for IE6, as it can't handle transparent png */

* html #primary-nav li li a.menuparent span {
/* set your image here, right arrow, 98% over from the left, 100% or 'right' puts it to far */
 background: url(uploads/ngrey/parent.gif) no-repeat 98% center;
}

ul#primary-nav li ul a {
/* insures alignment */
 text-align: left;
 margin: 0px;
/* keeps it relative to it's container */
 position: relative;
/* less padding than first level no need for large links here */
 padding: 6px 3px 6px 15px;
/* if first level is set to bold this will reset this level */
 font-weight: normal;
/* first level is #FFF/white, we need black to contrast with light background */
 color: #000;
 border-top: 0 none;
 border-right: 0 none;
 border-left: 0 none;
}

ul#primary-nav li ul {
/* very lite grey color, by now you should know what the rest mean */
 background: #009999;
 margin: 0px;
 padding: 0px;
 position: absolute;
 width: auto;
 height: auto;
 display: none;
 position: absolute;
 z-index: 999;
 border-top: 1px solid #FFFFFF;
 border-bottom: 1px solid #374B51;
/*Info: The opacity property is  CSS3, however, will be valid just in CSS 3.1) http://jigsaw.w3.org/css-validator2) More Options chose CSS3 3) is full validate;)*/
   opacity: 0.95;
/* CSS 3 */
}

ul#primary-nav li ul ul {
/*Info: The opacity property is  CSS3, however, will be valid just in CSS 3.1) http://jigsaw.w3.org/css-validator2) More Options chose CSS3 3) is full validate;)*/
   opacity: 95;
/* CSS 3 */
}
/* Styling the appearance of menu items on hover */

#primary-nav li:hover, #primary-nav li.menuh, #primary-nav li.menuparenth, #primary-nav li.menuactiveh {
/* set your image here, dark grey image */
   background: url(uploads/ngrey/darknav.png) repeat-x left center;
}
/* The magic - set to work for up to a 3 level menu, but can be increased unlimited, for fourth level add
#primary-nav li:hover ul ul ul,
#primary-nav li.menuparenth ul ul ul,
*/

#primary-nav ul, #primary-nav li:hover ul, #primary-nav li:hover ul ul, #primary-nav li.menuparenth ul, #primary-nav li.menuparenth ul ul {
 display: none;
}
/* for fourth level add
#primary-nav ul ul ul li:hover ul,
#primary-nav ul ul ul li.menuparenth ul,
*/

#primary-nav li:hover ul, #primary-nav ul li:hover ul, #primary-nav ul ul li:hover ul, #primary-nav li.menuparenth ul, #primary-nav ul li.menuparenth ul, #primary-nav ul ul li.menuparenth ul {
 display: block;
}
/* IE6 Hacks */

#primary-nav li li {
 float: left;
 clear: both;
}

#primary-nav li li a {
 height: 1%;
}
----------------------------------------------

Cms Version: 1.6.6

Installed Modules:

   * CMSMailer: 1.73.14
   * FileManager: 1.0.1
   * MenuManager: 1.6.2
   * ModuleManager: 1.3.1
   * News: 2.10.3
   * nuSOAP: 1.0.1
   * Printing: 1.0.4
   * Search: 1.6.1
   * ThemeManager: 1.1.1
   * TinyMCE: 2.6.1.1
   * VisitorStats: 0.2.1
   * MysqlDump: 1.2.4

Config Information:

   * php_memory_limit:
   * process_whole_template: false
   * max_upload_size: 10000000
   * default_upload_permission: 664
   * assume_mod_rewrite: false
   * page_extension:
   * internal_pretty_urls: false
   * use_hierarchy: true

Php Information:

   * phpversion: 5.2.12
   * md5_function: On (True)
   * gd_version: 2
   * tempnam_function: On (True)
   * magic_quotes_runtime: Off (False)
   * memory_limit: 32M
   * max_execution_time: 300
   * safe_mode: Off (False)
   * session_save_path: /home/users/web/b2717/hy.vsaconsulting/cgi-bin/tmp (0755)
   * session.use_cookies: On (True)

Server Information:

   * Server Api: cgi
   * Server Db Type: MySQL (mysql)
   * Server Db Version: 5.0.45

----------------------------------------------
Last edited by tpullano on Tue Mar 09, 2010 1:27 am, edited 1 time in total.
User avatar
Dr.CSS
Moderator
Moderator
Posts: 12711
Joined: Thu Mar 09, 2006 5:32 am
Location: Arizona

Re: Another disappearing menu issue w/ IE6 & 7

Post by Dr.CSS »

It's most likely from using position:relative on the #content, I see no need for that...
tpullano
Forum Members
Forum Members
Posts: 15
Joined: Sun Feb 07, 2010 2:50 pm

Re: Another disappearing menu issue w/ IE6 & 7

Post by tpullano »

Thanks Doc, that was easy...and in my non-menu css no less...

Any thoughts on why the below doesn't bring up the menu bottom margin up?

Code: Select all

<!--[if IE 7]>
<style type="text/css">
#primary-nav li {margin-bottom: -3px;}
#primary-nav li:hover {margin-bottom:-3px;}
</style>
<![endif]-->
User avatar
Dr.CSS
Moderator
Moderator
Posts: 12711
Joined: Thu Mar 09, 2006 5:32 am
Location: Arizona

Re: Another disappearing menu issue w/ IE6 & 7

Post by Dr.CSS »

I find this works best for me, although this is for a vertical cssmenu, the first one you have is only targeting the non parent li so it's not needed...

#primary-nav li.menuparent:hover {margin-bottom:-4px;}
tpullano
Forum Members
Forum Members
Posts: 15
Joined: Sun Feb 07, 2010 2:50 pm

Re: Another disappearing menu issue w/ IE6 & 7

Post by tpullano »

Thanks, tried that but no go. Wondering if your code is for a vertical rather than horizontal. Here is the code within a {literal} in my template:

Code: Select all

<!--[if IE 7]>
    <style type="text/css">
    #primary-nav li.menuparent:hover {margin-bottom:-4px;}
    </style>
    <![endif]-->
Also I added screenshots for FF and IE (happens in both 6 & 7, and both on hover and when a parent menu is selected.)

Image    Image
tpullano
Forum Members
Forum Members
Posts: 15
Joined: Sun Feb 07, 2010 2:50 pm

Re: Another disappearing menu issue w/ IE6 & 7

Post by tpullano »

I guess my pics didn't post...I re-attached.  ff.gif for firefox, IE.gif for IE!!

Notice how the menu drops below the line. Happens in IE6 & 7
Attachments
IE.gif
ff.gif
Last edited by tpullano on Thu Feb 11, 2010 1:30 pm, edited 1 time in total.
User avatar
Dr.CSS
Moderator
Moderator
Posts: 12711
Joined: Thu Mar 09, 2006 5:32 am
Location: Arizona

Re: Another disappearing menu issue w/ IE6 & 7

Post by Dr.CSS »

If it is just a matter of the top level menu item being to big, I have no real idea with out a link to check it, then you need to target the browser with less padding for those links...

My code is for second level menu items not being click-able as they, the li, become separated...
tpullano
Forum Members
Forum Members
Posts: 15
Joined: Sun Feb 07, 2010 2:50 pm

Re: Another disappearing menu issue w/ IE6 & 7

Post by tpullano »

Last edited by tpullano on Sun Feb 21, 2010 4:23 am, edited 1 time in total.
tpullano
Forum Members
Forum Members
Posts: 15
Joined: Sun Feb 07, 2010 2:50 pm

Re: Another disappearing menu issue w/ IE6 & 7

Post by tpullano »

Ok, just about there. Redid the menu and it renders quite well in Firefox and IE8.

In IE6, the menu wrapper falls a bit below the horizontal solid line, but not a big deal. The menus work fine and no one should be on IE6 at this point (but we know there are many!).

It is with IE7 that there still a problem. I adjusted the menuwrapper using the code below (the height: in the css is at 43px, 38px works in IE7 fine), but the primary nav falls below.

I tried the below (line 4 & 5) and also tried lowering the padding: to -3px; in place of 4 & 5 but still nothing. Link in post above...  I hate IE  >:(

Code: Select all

{literal}
1    <!--[if lte IE 7]>
2    <style type="text/css">
3   #menuwrapper {height: 38px;}
4    #primary-nav li {margin-bottom: -3px;}
5    #primary-nav li:hover {margin-bottom:-3px;}
6    </style>
7    <![endif]-->
{/literal}
tpullano
Forum Members
Forum Members
Posts: 15
Joined: Sun Feb 07, 2010 2:50 pm

Re: Another disappearing menu issue w/ IE6 & 7

Post by tpullano »

Well, I seem to have tried every hack and every setting for the primary-nav targeting IE7 specifically but cannot seem to get it to move or get shorter in height. Still falls below the menuwrapper. Anyone? Dr. CSS?
User avatar
Dr.CSS
Moderator
Moderator
Posts: 12711
Joined: Thu Mar 09, 2006 5:32 am
Location: Arizona

Re: Another disappearing menu issue w/ IE6 & 7

Post by Dr.CSS »

You have an unnecessary padding, 2px, in the top of your #primary-nav ul, either take it out all together or target ie7 to not see it...
tpullano
Forum Members
Forum Members
Posts: 15
Joined: Sun Feb 07, 2010 2:50 pm

Re: Another disappearing menu issue w/ IE6 & 7

Post by tpullano »

Can't take it out else that will break it in firefox and IE8. I use the below in my template, but it does not change the padding at all: (and tried iterations of #primary-nav by itself, with li, with li.menuparent)

Code: Select all

{literal}
    <!--[if lte IE 7]>
    <style type="text/css">
    #primary-nav {padding-top: 0px;}
    #menuwrapper {height: 38px;}
     </style>
    <![endif]-->
{/literal}
The #menuwrapper entry does work...
tpullano
Forum Members
Forum Members
Posts: 15
Joined: Sun Feb 07, 2010 2:50 pm

Re: Another disappearing menu issue w/ IE6 & 7

Post by tpullano »

Ok, a bit more progress. Used the below hack in the menu css to get rid of the top padding:

Code: Select all

*:first-child+html #primary-nav {
   padding-top: 0px;
}
So the #primary-nav is better but still falls below the #menuwrapper in IE7. Tried adjusting the height of it to match the #menuwrapper (by adding a "height: 38px;" line), but cannot. Any thoughts?
User avatar
Dr.CSS
Moderator
Moderator
Posts: 12711
Joined: Thu Mar 09, 2006 5:32 am
Location: Arizona

Re: Another disappearing menu issue w/ IE6 & 7

Post by Dr.CSS »

Lots of them but not sure you want to hear them, that is if you are still having problems...
tpullano
Forum Members
Forum Members
Posts: 15
Joined: Sun Feb 07, 2010 2:50 pm

Re: Another disappearing menu issue w/ IE6 & 7

Post by tpullano »

I think I'm good Doc. Re-did some of the menu with a friends help. I will make this thread solved. Took away lots of the absolute positioning, Also he mentioned that usually for drop downs it is better to use left:-999em to hide the menu instead of display:none and then use left:0 to bring it back instead of display:block. It works better in IE and is better for screen readers also.
Last edited by tpullano on Tue Mar 09, 2010 1:33 am, edited 1 time in total.
Post Reply

Return to “Layout and Design (CSS & HTML)”