hexagoncircle
Member
Posted 1 year ago #
On shakymolars.com, the php menu does not show up at all in Internet Explorer 7 or 8.
header.php:
<nav>
<ul>
<li><?php wp_nav_menu(array('menu' => 'Main Nav Menu')); ?></li>
</ul>
</nav>
functions.php:
if (function_exists('register_nav_menus')) {
register_nav_menus(
array(
'main.nav' => 'Main Navigation Menu'
)
);
}
Any ideas why? It seems to show up in all the other browsers just fine.
juliabarry
Member
Posted 9 months ago #
I'm having the same issue in all IE versions with similar code:
<?php wp_nav_menu( array( 'theme_location' => 'primary' ) ); ?>
I tested out for the classic IE margin/float/width/absolute positioning/z-index issues, and it really seems like the menu items are literally not there, not just getting blocked out by something else.
My site is http://griefland.com. (It's behind an Under Construction plugin while working.)
Thanks for your help!
No one can really help if it's behind that plugin. Check your code errors with http://validator.w3.org/
juliabarry
Member
Posted 9 months ago #
I can make a username/pass for help, but not sure if I'm allowed to post that here?
Please don't. Never, ever, post login information on a public forum.
juliabarry
Member
Posted 9 months ago #
That's what I thought. So how can I create a user so you guys can help? Much appreciated!
Julia,
The hierarchy of child elements through the wp_nav_menu() function means the CSS for the menu will break in older Internet Explorer browsers.
A specific example is through the CSS selector li > ul.
Perhaps this has something to-do with your issue.
juliabarry
Member
Posted 9 months ago #
Yeah, it sure seems like IE isn't responding correctly to wp_nav_menu, but it's also broken even in newer versions, so I'm really not sure where the issue is.
Do you have any resources I can read about the li > ul issue?
Should I replace wp_nav_menu with an older function?
Blargh. Thanks for your help!
juliabarry
Member
Posted 9 months ago #
Actually, it turned out that my renderer just wasn't showing it right, and the menu *does* work in IE. I was able to fix other issues through CSS tweaks. Thanks guys!