Viewing 5 replies - 1 through 5 (of 5 total)
  • You can accomplish this with a little CSS. Add or modify this in your stylesheet:

    ul.menu > li:after {
    	content: "/";
    }
    
    ul.menu > li:last-child:after {
    	display: none;
    }

    This will add a / to each list item with the class “menu” except for the last item. Of course, you can use a different character.

    Another way that might look interesting:

    ul.menu > li {
            border-right: 1px red;
    }
    
    ul.menu > li:last-child {
            border: none;
    }

    @smdaymeansnever:Thank you contributing to the forums but please do not encourage people to edit theme files directly. At best, they will lose all of their changes when they update the theme. At worst, they could bring their site down. They should be recommended to create a child theme or use a custom CSS plugin for their changes.

    Thread Starter abir759

    (@abir759)

    Thanks smdaymeansnever its work for me.! I also got another code for doing this,

    I simply add
    boreder-right:1px soild; in menu section of style.css

    Thanks a lot esmi for support
    ??

    @esmi, you’re absolutely right. I’ll remember to reference the child themes in the future since beginners are more likely to be jumping right in and making those changes to their parent theme. Thanks for the reminder!

    No problem ??

Viewing 5 replies - 1 through 5 (of 5 total)
  • The topic ‘add dividers between nav menu items’ is closed to new replies.