The Lodge is members-only design/dev videos and Office Hours.

Next Office Hours Session: "Implementing an SVG Icon System" Nov 30 - 6:00 PM Eastern

Cannot align menu-div centered

  • # June 18, 2013 at 11:59 am

    Hey all,

    Can anybody tell me where’s my mistake?
    The menue should be aligned in the center
    of the body.

    [Your text to link here…]( “klick here”)

    # June 18, 2013 at 12:01 pm

    Try this:

    .navigation ul{

    .navigation ul li{


    # June 18, 2013 at 12:07 pm

    @Paulie_D, need block too (it’s set to inline-block now)

    .navigation ul {
    display: block;
    text-align: center;

    # June 18, 2013 at 12:07 pm

    Thank you!

    Can you explain in short why it’s working right now?

    # June 18, 2013 at 12:14 pm

    But I see that the text-parts in the header are not aligned correctly:

    [Your text to link here…]( “”)

    The menue has more space on its left side than on his right side.

    # June 18, 2013 at 12:27 pm

    Add `padding: 0;` to `.navigation ul`.

    # June 18, 2013 at 12:32 pm

    Great, that’s it.

Viewing 7 posts - 1 through 7 (of 7 total)

You must be logged in to reply to this topic.

There's a whole bunch of content on CSS-Tricks.

Search for Stuff   •   Browse the Archives

Get the Newsletter ... or get the RSS feed