Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 3607630
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 18, 20262026-05-18T21:23:59+00:00 2026-05-18T21:23:59+00:00

I’m having a menu spacing issue in IE7 and IE6 that I cannot get

  • 0

I’m having a menu spacing issue in IE7 and IE6 that I cannot get to look right.

My navigation can be found at http://js.philosophydesign.com


(source: philosophydesign.com)

As you can see in IE8 and others it displays fine. IE7 the menu items are partially seperated but in IE6 they are seperated hugely.

Navigation HTML:

<a class="float-left" href="http://js.philosophydesign.com"><img src="http://js.philosophydesign.com/wp-content/themes/philosophy/images/logo.gif" alt="Jeremy Stratton - Writing that works" title="Jeremy Stratton - Writing that works" /></a>
<div id="mainnavcont" class="float-right">
  <ul id="mainmenu" class="menu">
    <li id="menu-item-25" class="menu-item menu-item-type-post_type current-menu-item page_item page-item-6 current_page_item menu-item-25"><a href="http://js.philosophydesign.com/">I get to your point</a></li>
    <li id="menu-item-26" class="menu-item menu-item-type-post_type menu-item-26"><a href="http://js.philosophydesign.com/me-and-my-work/">Me and my work</a></li>
    <li id="menu-item-27" class="menu-item menu-item-type-post_type menu-item-27"><a href="http://js.philosophydesign.com/things-ive-written/">Some of the things I’ve written</a></li>
    <li id="menu-item-28" class="menu-item menu-item-type-post_type menu-item-28"><a href="http://js.philosophydesign.com/improve-your-writing/">Improve your writing</a></li>
    <li id="menu-item-29" class="menu-item menu-item-type-post_type menu-item-29"><a href="http://js.philosophydesign.com/what-people-say-about-me/">What people say about me</a></li>
    <li id="menu-item-30" class="menu-item menu-item-type-taxonomy menu-item-30"><a href="http://js.philosophydesign.com/category/my-blog/">My blog</a></li>
    <li id="menu-item-31" class="menu-item menu-item-type-post_type menu-item-31"><a href="http://js.philosophydesign.com/get-in-touch/">Get in touch</a></li>
  </ul>
</div>

Navigation CSS:

/**** Main Navigation ****/
div#mainnavcont {
    float:right;
    width:673px;
}
ul#mainmenu {
    display:block;
    list-style:none;
    margin:0;
    padding:0;
}
ul#mainmenu li a {
    color:#000;
    display:block;
    font-family:"HelveticaNeueLight45", "Trebuchet MS", Arial, Helvetica, sans-serif;
    font-size:12px;
    font-weight:normal;
    padding-left:10px;
    margin-left:-10px;
    text-decoration:none;
}
ul#mainmenu li a:hover, ul#mainmenu li.current-menu-item a, ul#mainmenu li.current-page-ancestor a {
    background:url(images/navbg.png) no-repeat 5px 50%;
}

Anyone know why this menu is acting up in IE7 and IE6?

Thanks

Scott

EDIT: Got it working with this css:

/**** Main Navigation ****/
div#mainnavcont {
    float:right;
    width:673px;
}
ul#mainmenu {
    display:block;
    list-style:none;
    margin:0;
    padding:0;
    width:200px;
}
ul#mainmenu li {
    display:block;
    float:left;
    width:200px;
}
ul#mainmenu li a {
    color:#000;
    display:block;
    font-family:"HelveticaNeueLight45", "Trebuchet MS", Arial, Helvetica, sans-serif;
    font-size:12px;
    font-weight:normal;
    padding-left:10px;
    margin-left:-10px;
    text-decoration:none;
    width:189px
}
ul#mainmenu li a:hover, ul#mainmenu li.current-menu-item a, ul#mainmenu li.current-page-ancestor a {
    background:url(images/navbg.png) no-repeat 5px 50%;
}
  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-18T21:24:00+00:00Added an answer on May 18, 2026 at 9:24 pm

    This is the “mysterious space between list items” that sometimes shows up in IE. Often it happens when the list item and link inside have different display types, or hasLayout is inconsistently applied. But the whole scenario is affected by a combination of display, line-height, and hasLayout. 🙂

    This gets them all to the same starting point (or it does in IE7, which is what I have at the moment.) I think the big issue for you was that you set #mainmenu and #mainmenu a to display:block but had left #mainmenu li at its default.

    #mainnavcont {
        float:right;
        width:673px;
    }
    #mainmenu, #mainmenu li, #mainmenu a {
        display:block;
        margin:0;
        padding:0;
        line-height:1;
        list-style:none;
    }
    #mainmenu {}
        #mainmenu li {}
            #mainmenu a {
                margin-left:-10px;
                padding-left:10px;
                color:#000;
                font-family:"HelveticaNeueLight45", "Trebuchet MS", Arial, Helvetica, sans-serif;
                font-size:12px;
                font-weight:normal;
                text-decoration:none;
            }
                #mainmenu a:hover, #mainmenu .current-menu-item a, #mainmenu .current-page-ancestor a {
                    background:url(images/navbg.png) no-repeat 5px 50%;
                }
    

    You can see some examples of various situations where this occurs by viewing http://www.brunildo.org/test/IEWlispace.php in IE. At the bottom of that site he mentions various fixes for various causes.

    If this doesn’t get you all the way there also check out:

    http://gtwebdev.com/workshop/gaps/white-space-bug.php

    There are some other solutions out there as well, but I can’t find my favorite reference right now. 🙁

    Related Tip

    If you end up needing more rules for just IE7 or IE6, check out this method of http://paulirish.com/2008/conditional-stylesheets-vs-css-hacks-answer-neither/ targeting IE.

    Unrelated Tip:

    If you don’t absolutely need the tag name to increase your rule’s specificity, it’s best to omit it. Not just because it makes your selectors shorter, but because of the way browsers parse and apply CSS. They start at the end of the rule, so in

    ul#mainmenu li a
    

    Worst case scenario the browser: finds all a, checks for li parents, checks for #mainmenu parents, and then checks that #mainmenu is a ul. This is superfluous and inefficient, especially when you add in the fact that element selectors are (according to browser vendors) less efficient than classes and ids. (Which means if you have a class like .menu-item on the li it’s better to use that in your selector than li.)

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

link Im having trouble converting the html entites into html characters, (&# 8217;) i
Seemingly simple, but I cannot find anything relevant on the web. What is the
Does anyone know how can I replace this 2 symbol below from the string
this is what i have right now Drawing an RSS feed into the php,
I'm trying to decode HTML entries from here NYTimes.com and I cannot figure out
That's pretty much it. I'm using Nokogiri to scrape a web page what has
I have a French site that I want to parse, but am running into
I have just tried to save a simple *.rtf file with some websites and
I want to count how many characters a certain string has in PHP, but
I ran into a problem. Wrote the following code snippet: teksti = teksti.Trim() teksti

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.