WordPress.org

Ready to get started?Download WordPress

Forums

Dynamic Menu not displaying in IE6 or IE7 (5 posts)

  1. bwoolbright
    Member
    Posted 4 years ago #

    Hello,

    I've added the dynamic menu,

    <div id="menu">

    </div><!--menu div-->

    to my header.php file and it displays just fine in Firefox, Safari, etc., but it doesn't display in IE6 or IE7. Any ideas?

  2. esmi
    Forum Moderator
    Posted 4 years ago #

    A link to your site might help. As would re-posting your code snippet within backticks (`).

  3. bwoolbright
    Member
    Posted 4 years ago #

    Hey,

    The link to my is http://www.madefromwool.com/. Sorry, forgot to read the backticks part.

    <div id="menu">
    	<ul>
                 <li class="current_page_item<?php if (is_home()) echo ' current_page_item'; ?>"><a href="<?php echo get_option('home'); ?>/" class="current_page_item">Home</a></li>
            				<?php wp_list_pages('title_li=' ); ?>
            </ul>
    </div><!--menu div-->

    I put the area where the menu is supposed to be in a red border. So you can see it.

  4. esmi
    Forum Moderator
    Posted 4 years ago #

    It's the dark nav background that's the root problem. It's in totally the wrong place in the source markup. In fact, it could be removed and it's styling added to #menu.

    IE7 & 6 don't like the negative margin that you're applying to #menu ul:

    #menu ul {
    margin:-36px 0 0;
    padding-top:7px;
    }

    If you don't want to change the markup in the header, the next best option would be to position #menu absolutely using something like:

    #menu {
    position:absolute;
    top:-36px;
    left:0;
    }

    and get rid of the negative top margin on #menu ul. You should have a better chance of IE 7 & 6 honouring absolute positioning correctly.

  5. bwoolbright
    Member
    Posted 4 years ago #

    Oh ok, I got it. I've got the whole site wrapped in a wrapper div and was trying to figure out how to get the brown nav bar to keep repeating horizontally, but when I initially put it in the menu div, it would stop at 960px, because that's what I set the wrapper width to.

    I guess I'll have to figure out another solution. Thanks for the help.

Topic Closed

This topic has been closed to new replies.

About this Topic