Site logo

Archived topic

CSS classes for custom nav menu

3 replies · Started by Matthew on August 11, 2020

Viewing posts 1–4 of 4

I added the following code in my template file for a new navigation menu where I want it to appear:

<?php
wp_nav_menu( array( 
    'theme_location' => 'gallery-menu', 
    'container_class' => 'custom-menu-class' ) ); 
?>

I need to use GP's existing menu class(es) so the menu becomes functional and is consistent with my main and secondary menu. But I'm not sure what and how to add the required CSS.

thanks,

I used the CSS in that resource:

.third-navigation ul {
    list-style-type: none;
    margin: 0;
}

.third-navigation ul {
    display: flex;
    justify-content: center;
}

.third-navigation a {
    padding: 0 20px;
    line-height: 40px;
    color: #a51c30;
}

Which provides a nice basic centered layout and removes the list appearance. But how can I bring the styling elements of the default (primary and secondary) GP navigation menus. I want this third menu to look like those. I might tweak it afterwards but want to use them as a base.

Thanks,

You would just need to style it with CSS.

Can you link us to the page in question if you need further help on this?

This archived topic is closed to new replies.