• Hi Community,
    I want to show the menu at the right side of the #masthead – Header. Could anybody help to resolve my problem? I use the following code:

    header.php

    <div id="masthead">
    <?php wp_nav_menu( array( 'theme_location' => 'primary' ) ); ?>
    </div>

    style.css

    #masthead {width="1200px;}
    .main-navigation ul,
    .main-navigation ul li {float: right;}

    That works well, there is only one problem: In the header now all items are in reverse order. Off course I could change their position in the adminarea. But this does not work if I want to use the same menu in another place (e.g. mobile)

    Either there is another possibility of sorting the list of menu items (e.g. DESC instead of ASC) or there is another way of making the menu move to the right side of the surrounding <div> Does anybody know how deal with the problem either this way or the other?

    Thank you!
    rabox66

Viewing 3 replies - 1 through 3 (of 3 total)
  • Thread Starter rabox66

    (@rabox66)

    Sorry, off course it must be
    #masthead {width: 200px;}

    Hi rabox66,

    You can use a div around the menu like this

    <div id="masthead">
    <div class="menuatright">
    <?php wp_nav_menu( array( 'theme_location' => 'primary' ) ); ?>
    </div>
    </div>

    with style like

    #masthead {width="200px;}
    #masthead .menuatright{float:right}
    .main-navigation ul,
    .main-navigation ul li {display:inline-block;}
    

    This will pull the menu to the right and show list of menu items in one line.

    With Regards

    Thread Starter rabox66

    (@rabox66)

    Thank you! Looks great!

Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘Menu on the right side’ is closed to new replies.