Changing style of additional nav bar
-
Hey there.
I wanted to add a second navigation menu directly under the main menu bar on my site. I figured out how to do that, but I cannot figure out how to change the style of it for the life of me. Can someone be my hero?
To add my menu, I added the code below to the functions.php:
function register_my_menu() { register_nav_menu('new-menu',__( 'New Menu' )); } add_action( 'init', 'register_my_menu' );
To make the second menu show up in the right location (under the existing nav menu bar), I put the following code into static-nav.php
<?php wp_nav_menu( array( 'theme_location' => 'new-menu' ) ); ?>
So once my new menu was showing up, I needed to change its style (I want it to have a smaller and lighter font than the main one). THIS IS WHERE I AM GETTING LOST.
I tried to modify the appearance of the second menu by adding the code below to style.css, but it has not changed anything about the second menu. I realize the code below doesn’t change the font size or color, but regardless the code doesn’t change the appearance of the second menu at all even if I change the text-align value to right or left or change the padding to 50px. I am missing something.
I am clearly doing something wrong because I am so new at this, but I can’t for the life of me figure out what it is.
.new-menu ul { text-align: center; list-style-type: none;}
.new-menu ul li {display: inline-block; padding: 0 5px;}
- The topic ‘Changing style of additional nav bar’ is closed to new replies.