WordPress.org

Ready to get started?Download WordPress

Forums

[TwentyEleven] Center the menu text (5 posts)

  1. pucklitaay
    Member
    Posted 1 year ago #

    How do I center the menu text of the navigation bar in TwentyEleven in my style.css of the child theme? :)

  2. Andrew
    Forum Moderator
    Posted 1 year ago #

    Add a width to the ul, then use margin: 0 auto. Remember when adding a width, consider if the menu expands.

  3. pucklitaay
    Member
    Posted 1 year ago #

    Where do I add this? Which ul?

  4. Andrew
    Forum Moderator
    Posted 1 year ago #

    Try the ul within the menu.
    E.g

    #access ul {
     width: yourWidth;
     margin: 0 auto;
    }
  5. pucklitaay
    Member
    Posted 1 year ago #

    It doesn't seem to work? Even when I add !important;

Topic Closed

This topic has been closed to new replies.

About this Topic