WordPress.org

Ready to get started?Download WordPress

Forums

Horizontal Page Menu will not center in IE7 (3 posts)

  1. llamaman
    Member
    Posted 5 years ago #

    Hello!
    I have a horizontal menu that uses the wp_list_pages() function. I would like to center the menu in the middle of the page. The menu currently aligns properly in Firefox 3, but it aligns on the left in Internet Explorer 7.

    I have tried all sorts of fixes for this, but nothing has worked.

    The trouble seems to be in the way that the wp_list_pages() function is formatted by IE7/CSS. When I replace the wp_list_pages() function in my template with some basic text, everything centers properly.

    The page with menu and text example is located here.

    In the template, I use the following code:

    <div id="suckerfishwrapper">
    
                            <ul id="suckerfishnav3">
                                <?php wp_list_pages('title_li=&include=86,92,94,88,90,98,96,78,33,37,39'); ?>
                            </ul>
    
                    </div>

    And my CSS is:

    #suckerfishwrapper{
    	width:900px;
    	margin:0 auto;
    	text-align:center;
    	background-color:#fff;
    /*    border:1px solid #bbb;*/
    	border-top-style:solid;
    	border-top-color:#000000;
    	border-top-width:thin;
    	border-bottom-style:solid;
    	border-bottom-color:#000000;
    	border-bottom-width:thin;
    }
    #suckerfishnav3, #suckerfishnav3 ul {
        text-align:center;
        list-style:none;
        line-height:20px;
        padding:0;
        margin: 0 auto 0 auto;
        width:100%;
        }

    Any help you can provide would be greatly appreciated.

  2. Dagon Design
    Member
    Posted 5 years ago #

    I would try giving #suckerfishnav3 a width in pixels, instead of 100%.

  3. llamaman
    Member
    Posted 5 years ago #

    Thanks, Dagon!
    That solves the problem.

Topic Closed

This topic has been closed to new replies.

About this Topic