php args不以div为中心

I am trying to get my nav menu to center in it's div, but I can't seem to figure out how. Please take a look and help if you can. Normal text gets centered but I can't get my menu to 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() is probably a nav element, which is displayed as a block element in most browsers. In that case, adding text-align: center; to the parent has no effect. The solution would be to somehow add margin: 0 auto; to the nav element itself.