How to control css styles for dynamically created menu items... (3 posts)

  1. matius
    Posted 5 years ago #

    So for instance if I set in my style sheet a right 1px border for my menu and I don't want it on the very last menu item.

    the code generating the list...

    <?php wp_nav_menu( array( 'container_class' => 'menu-header', 'theme_location' => 'primary' ) ); ?>

    Appreciate any insights

  2. esmi
    Forum Moderator
    Posted 5 years ago #

    Add a left border and then remove it on the first list item using the :first-child pseudo class.

  3. matius
    Posted 5 years ago #

    awesome, thank you^^

Topic Closed

This topic has been closed to new replies.

About this Topic