Forums

The forums ran from 2008-2020 and are now closed and viewable here as an archive.

Home Forums CSS [Solved] ul navbar – centering problem with IE

  • This topic is empty.
Viewing 6 posts - 1 through 6 (of 6 total)
  • Author
    Posts
  • #30261

    I’ve googled this problem, which is apparently common, with varying search terms, tried over a dozen “fixes”, all with the same result – my site’s navbar looks great in every browser except (of course, of course) IE.

    link: http://www.ocprobilliards.com/

    I *know* it’s possible, because this guy did it: http://www.cssplay.co.uk/menus/centered.html

    I tried modifying my code based on his, but no cigar. I would appreciate any help given.

    #79644
    noahgelman
    Participant

    Which version of IE? All? 8? 7? 6? Also, did you check to make sure that guys’ was working on IE as well?

    #79646
    jamygolden
    Member

    Well… I would say follow the other guy’s example lol.

    I tried it myself and it works.

    Change your CSS to this and see if it works:

    #navbar {
    clear:both;
    float:left;
    overflow:hidden;
    width:100%;
    }

    #navbar ul {
    border-right:1px solid white;
    border-top:1px solid white;
    float:left;
    left:50%;
    list-style-type:none;
    margin:0 auto;
    padding:0;
    position:relative;
    }

    #navbar li {
    float:left;
    font-size:20pt;
    position:relative;
    right:50%;
    }
    #79621

    I am using IE8.

    @Jamy_za, when I tried the changes you suggested, it wasn’t really centered, just pushed to the right, and for some reason it also bumped the navbar below the line of my header div. (see: http://ocprobilliards.com/images/jamy_za.jpg)

    I did check about the navbar centered-float version I linked to, which does work in IE. I’ve revised a bit more and have gotten the right border to appear correctly around the navbar at least, but it’s still not centered and I really can’t see why not.

    #79622
    shagzdesign
    Member

    remove text-align: left from your #wrapper and it should fix your problem

    #79627

    Gah! I looked for an inheritance issue but I just couldn’t spot it. Thank you, that did fix it.

Viewing 6 posts - 1 through 6 (of 6 total)
  • The forum ‘CSS’ is closed to new topics and replies.