WordPress.org

Ready to get started?Download WordPress

Forums

[resolved] Nav-Menu-Template.php (5 posts)

  1. HenriqueOliveira
    Member
    Posted 3 years ago #

    Hi,

    I'm trying to customize my nav menu, but i need to know the position of the item in the menu. How can i get that information?

    Thanks

  2. wdawson
    Member
    Posted 3 years ago #

    Do you know the name of the element? Look through the stylesheet for that element and that should tell you the positioning... I'm not sure if that's what you mean though...

  3. HenriqueOliveira
    Member
    Posted 3 years ago #

    What do you mean with name of the element? When nav menu is generated, creates a
    <ul> element and the items in a <li> element. something like this:
    <div class="nav"><ul id="menu-menu" class="nav-buttons"><li id="menu-item-69" class="menu-item menu-item-type-custom menu-item-home menu-item-69">Inicio
    <li id="menu-item-66" class="menu-item menu-item-type-post_type menu-item-66">Sobre Mim

  4. wdawson
    Member
    Posted 3 years ago #

    OK, in that case you'd need to check the css for the class menu-item (or one of the other classes listed).

    It should look something like...

    .menu-item{
    INFO HERE;
    }

    In the info here spot, there will be information indicating how and where that element is positioned. This could include margins, padding, alignment, etc. But, that's the info you need. Again, I'm not sure I'm understanding the question right, but if I am that should help.

  5. HenriqueOliveira
    Member
    Posted 3 years ago #

    That's not my question... i mean position in menu bar...
    Imagine that i have a menu like this:

    Link1 | Link2 | Link3 | Link4

    For example, what i want to know is the position of "Link3", because i what to put a attribute a deferent class to that item..

Topic Closed

This topic has been closed to new replies.

About this Topic

Tags