• jehojakim

    (@jehojakim)


    Hi,

    The site this is about uses a child theme of TwentySixteen.
    Its main menu has 5 items, of witch item 1 and 3 have subitem(s). The third item has two sub items, placed correctly, that is, the right side is aligned with the right side of it’s mia menu parent.
    But the sub item of the first main item is positioned too far to the left. It should also be right aligned with the menu item it is a sub item from.

    I red a posting of two years ago on the WordPress forums, in which it was advised to use customized css code

    Admin Panel > Appearance > Customize > Additional CSS fields

    and add

    .navbar-right .dropdown-menu {
      left: 0;
      right: auto;
    }

    I used that, experimented a little with the left: and right: variables, reloaded the site every time, but nothing changes.

    Using the Element inspector of my browser I could set Text Align to Right, but than all text is right aligned, which is not preferable.

    Any ideas?

    The page I need help with: [log in to see the link]

Viewing 5 replies - 1 through 5 (of 5 total)
  • nsblue

    (@nsblue)

    Thread Starter jehojakim

    (@jehojakim)

    Well, I’m absolute a WP-beginner, so there you guide me in the proper direction.

    But my question is about subitems in a menu, not about categories/subcategories.
    I did read the article now, of course, but I don’t see any hooks to my problem there.

    But thanks for your reaction!

    nsblue

    (@nsblue)

    In rereading your post, is it you want a menu, that holds the category tile and the pages under it? That could be done with a plug in. https://www.ads-software.com/plugins/recent-posts-by-category-widget/ When making specific menus and labeling them, the widget helps you add those specific menu to pages (not sure if I am explaining…I am a novice too and still am learning.

    I have used this plug on my site, to make a widget that holds a menu of a specific category on certain pages. I have used it on my site for my recipe page, my poems page etc and was able to add a widget menu and all posts be displayed under the category title. example
    I used the default widget to show list of categories https://melsgraphics.com/category/recipes/
    Then when clicked I used the plug in to make a widget of the posts.https://melsgraphics.com/category/recipes/breads/

    When I do not completely understand how to do something, I think outside the box to find something that works in looking at plugins that may work.
    Not sure if this is of any help…hopefully someone else may….

    Thread Starter jehojakim

    (@jehojakim)

    Hi, thanks for our reply!

    I went to your site, it’s looking good in the way the menu’s are created and placed!

    But I think that what I want it not as complicated as this. If you go to my site ( Vocaal ensemble Leeuwarden), and hover above the first item (“Het koor”) in the main menu, then you see the sub item “Organisatie”. Hopefully you agree with me that the word “Organisatie” is placed way to far left.
    If, though, you hover above the third item (“Concerten”), then you see the two subitems (“Komende concerten” and “Vorige concerten”) placed neatly under the main menu.
    So the question is: how can the sub menu item under the first item of the main menu, be placed correctly?

    • This reply was modified 4 years ago by jehojakim.
    nsblue

    (@nsblue)

    ohhhh ok I understand what you mean, you are looking to change the drop down menu position on your primary menu of which you would need the code to do so.

    Each theme is different. In finding the code snippet responsible for this is needed so you can change and replacing that code in a child theme or Additional CSS so that every upgrade you dont lose that code.

    I know the twenty-sixteen I am building is that way but I have grown accustom to it and I realized the arrow showing to the right of the pop up is in alignment for me to move my curser down the list. https://melaniepbates.ca/oaigns.org/

    Hopefully you will be able to find a code guru to help if your= really need it centered.

Viewing 5 replies - 1 through 5 (of 5 total)
  • The topic ‘Subitem of main menu alignment wrong’ is closed to new replies.