Forums

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

Home Forums CSS [Solved] Centering Navigation Bar CSS Problem

  • This topic is empty.
Viewing 5 posts - 1 through 5 (of 5 total)
  • Author
    Posts
  • #204527
    wraymus
    Participant

    I have a navigation menu that is centering fine(The menu bar), but I would really like the links within the menu bar to be centered as well. I’ve tried everything I can think of. I’ve posted a working example at CodePen: http://codepen.io/anon/pen/GJQXKN I would really appreciate any pointers in the right direction.

    Thanks so much!

    Wraymus

    #204529
    Paulie_D
    Member

    You had some conflicting styles in there and some initial styles were overriden further down.

    http://codepen.io/Paulie-D/pen/QbQZEe

    #204538
    wraymus
    Participant

    Paulie_D,

    Thank you so very much! I’m curious: Was it one of the float:left styles?

    Best regards,
    Wraymus

    #204539
    Paulie_D
    Member

    There were a couple of things.

    Centering with float applied is pretty hard so inline-block and text-align:center works best here….at least for the top level list items…so, yeah, I removed that.

    Also, the menubar itself wasn’t centered so I adjusted that too.

    #204549
    wraymus
    Participant

    Thank you so much for taking the time to reply. I very much appreciate you.

    Best regards,
    Wraymus

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