[resolved] [Theme: Twenty Twelve] Right align last item in navigation bar (6 posts)

  1. Moritz83
    Posted 3 years ago #


    I would like to right align the last item in the navigation bar. Came across "page-item-247" but I don't get the correct CSS code. This is what I got so far:

    .main-navigation div.nav-menu .page-item-247 {
    text-align: right;

    I think there is something missing :/


  2. WPyogi
    Forum Moderator
    Posted 3 years ago #

    This appears to do what you want - putting it inside a media query applies it to bigger screens - otherwise it will mess up the mobile menu.

    @media screen and (min-width: 600px) {
    .main-navigation li.page-item-247 {
    float: right;

    EDIT - also remove the code you added trying to do this :).

  3. Moritz83
    Posted 3 years ago #

    lol .... guess what:

    Your code already contains the fix for mine which is not working :D

    I wrote "text-align: right" and it should (according yours) be "float: right"!

    thanks a lot :)

  4. Andrew Nevins
    Forum moderator
    Posted 3 years ago #

    Thanks WPyogi :)

  5. wijbrandschaap
    Posted 3 years ago #

    I've been working on this thing too, and have succeeded in creating a search box in de menubar, using this, and other tutorials. However: I just can't seem to get it to float right. Float:right works everywhere else on the site, except in the menubar. What am I doing wrong?

  6. WPyogi
    Forum Moderator
    Posted 3 years ago #

    @wijbrandschaap - please start your own thread and include a link to your site.

Topic Closed

This topic has been closed to new replies.

About this Topic


No tags yet.