• Resolved Moritz83

    (@moritz83)


    G’day,

    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 :/

    Cheers
    Moritz

Viewing 5 replies - 1 through 5 (of 5 total)
  • 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 :).

    Thread Starter Moritz83

    (@moritz83)

    lol …. guess what:

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

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

    thanks a lot 🙂

    Andrew Nevins

    (@anevins)

    WCLDN 2018 Contributor | Volunteer support

    Thanks WPyogi 🙂

    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?

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

Viewing 5 replies - 1 through 5 (of 5 total)
  • The topic ‘[Theme: Twenty Twelve] Right align last item in navigation bar’ is closed to new replies.