WordPress.org

Forums

Travelify
[resolved] having one menu link on the right of the menu bar... (6 posts)

  1. Neildavison
    Member
    Posted 1 year ago #

    I want to have one menu button on the right side of my menu bar with a gap between the group on the left and this one on the right. It's for a log in page.
    Thank you

    http://www.neildavison.co.uk

  2. ErnestClose
    Member
    Posted 1 year ago #

    Hi Neil,

    You can create a new menu for this login menu item and position it with css or you can easily move the current login item to the right using css. If you choose to move the current menu item I can post the code you need here, but there are a few things to keep in mind should you choose this option.

    Let me know what you decide.

    Regards

    Ernest Close

  3. Neildavison
    Member
    Posted 1 year ago #

    To be honest I don't mind either, which ever would be best for it to appear on all formats, PC, ipad etc.
    I have tried playing with the CSS in the menu option within wordpress but no joy, and no joy trying the css of

    #menu-item-143{
    float: right;
    }

    As long a this new menu item will stay on the right when the window is 100% and I can still add other menu items to the left I would be greatful :)

    Thank you

  4. ErnestClose
    Member
    Posted 1 year ago #

    Right, but the thing to keep in mind is that whenever you remove or change the main menu item you will have to update the css again accordingly as the number 143 might change. You are right to change menu item 143, but you should change it's class not id and mark it as important. Add these two styles to your custom stylesheet:

    .menu-item-143 {
    	float: right !important;
    }
    #main-nav ul li.menu-item-143 ul {
    	position: absolute;
    	background-color: #fff;
    	border-bottom: 4px solid #439f55;
    	top: 40px;
    	left: -68px ;
    	width: 190px;
    }

    You will notice I moved the child menu item to the left as well to prevent it from protruding on the right by adding -68px to the left. You can change this to get the desired effect. You can add more menu items to the menu, it will have no effect on the login item on the right.

    Let me know if this works for you.

    Regards

    Ernest Close

  5. Neildavison
    Member
    Posted 1 year ago #

    That is perfect thank you very much Ernest!
    Is it possible to have the text on the right or centered rather then the left? Just wanted to know to play with the look of it.

    Thanks again, greatly appreciated :)

  6. ErnestClose
    Member
    Posted 1 year ago #

    Yes you can add text-align: right; or text-align: center; to the .menu-item-143 class, but you should probably also look at things like padding.

    Glad I could help.

Topic Closed

This topic has been closed to new replies.

About this Theme

About this Topic

Tags

No tags yet.