danny-d
8/22/2017 - 2:40 PM

Add class to each sub-nav in Divi for separate styling. (add this code to Divi > Theme Options > Integrations > Body scripts. This will add

Add class to each sub-nav in Divi for separate styling. (add this code to Divi > Theme Options > Integrations > Body scripts. This will add a class to each individual sub nav (ie "sub-nav-1", "sub-nav-2" and so on). These new classes can now be styled individually to target the border-color, or anything else you want.

.nav li ul.sub-menu-1, 
.nav li ul.sub-menu-4 {border-color: red;}
.nav li ul.sub-menu-2,
.nav li ul.sub-menu-5 {border-color: blue;}
<script type="text/javascript">
  jQuery(document).ready(function($) {
    $( ".menu-item-has-children .sub-menu" ).addClass(function( index ) {
      return "sub-nav-" + index;
    });
  })
</script>