html - php args not centering in div -
i trying nav menu center in it's div, can't seem figure out how. please take , if can. normal text gets centered can't menu center.
html:
<div id = "nav_menu_secondary"> <div id = "center_wrap"> <?php $args = array( 'theme_location' => 'secondary' ); wp_nav_menu( $args ); ?> </div> </div>
css:
#center_wrap { margin: 0 auto; text-align: center; }
the result of wp_nav_menu()
nav
element, displayed block element in browsers. in case, adding text-align: center;
parent has no effect. solution somehow add margin: 0 auto;
nav
element itself.
Comments
Post a Comment