WordPress.org

Ready to get started?Download WordPress

Forums

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

  1. Moritz83
    Member
    Posted 1 year ago #

    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

  2. WPyogi
    Volunteer Moderator
    Posted 1 year 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
    Member
    Posted 1 year 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
    Barrel Rider, Spam Zapper & Volunteer Moderator
    Posted 1 year ago #

    Thanks WPyogi :)

  5. wijbrandschaap
    Member
    Posted 9 months 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
    Volunteer Moderator
    Posted 9 months 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

Tags

No tags yet.