Viewing 4 posts - 1 through 4 (of 4 total)
  • Author
    Posts
  • #314183

    The site I am completing (link is below) has a number of custom side menus, which I’ve adjusted the spacing of using the following child-theme custom CSS.

    /* Increase spacing in most side menus (Our Homes, Core Programs, etc.) */
    .widget_nav_menu .menu-item {
    padding-top: 5px;
    }

    This looser spacing is the site default. I need to override it for selected custom menus, so they return to their original, tighter spacing. I tried the following, on the example page I gave you, and it doesn’t work.

    /* Normalize spacing in the News by Home side menu */
    .widget_nav_menu .menu-news-by-home-container .menu-item {
    padding-top: 0px;
    }

    Can you advise? I will be able to apply the answer to other cases.

    Thanks!

    #314563

    Hi Ben!

    Currently selected menu items get a special class, try:

    .widget_nav_menu .current-menu-item{
    padding-top: 0px;
    }

    Best regards,
    Josue

    #316033

    Hi Josue. This isn’t what I’m looking for. I want to affect the spacing on the whole side menu, not a single item.

    On the “Recent News” page (my original link) I want the side menu, “News by Home”, to be a tight list with no spacing between items.

    Thanks.

    #316306

    Hi!

    Please use this:

    .widget_nav_menu a {
    display: block;
    padding: 0;
    }
    
    .widget_nav_menu .menu-item {
    padding-top: 0;
    }

    Cheers!
    Ismael

Viewing 4 posts - 1 through 4 (of 4 total)
  • You must be logged in to reply to this topic.