如何从wordpress的Walker_Nav_Menu中删除<div class =“menu”>

I want to remove <div class="menu"> from Walker_Nav_Menu ,I am getting default <div class='menu'> in menues ,I have tried to rename container in but it is not working

<div class="menu">
<ul>
<li class="page_item page-item-66"><a href="http://localhost/wp/about-us/">About Us</a>
</li>
<li class="page_item page-item-72"><a href="http://localhost/wp/contact-us/">Contact us</a></li>
<li class="page_item page-item-70 current_page_item"><a href="http://localhost/wp/enquiry/">Enquiry</a></li>
<li class="page_item page-item-74"><a href="http://localhost/wp/home/">Home</a></li>
<li class="page_item page-item-68"><a href="http://localhost/wp/product/">Product</a></li>
<li class="page_item page-item-2"><a href="http://localhost/wp/sample-page/">Sample Page</a></li>
</ul>
</div>

code to print menu

<?php wp_nav_menu( array( 'theme_location' => 'main-menu' ) ); ?>

$defaults = array( 'menu' => '', 'container1' => '', 'container_class' => 'false', 'container_id' => '', 'menu_class' => '', 'menu_id' => '',
    'echo' => true, 'fallback_cb' => 'wp_page_menu', 'before' => '', 'after' => '', 'link_before' => '', 'link_after' => '', 'items_wrap' => '<ul id="%1$s" class="%2$s">%3$s</ul>',
    'depth' => 0, 'walker' => '', 'theme_location' => '' );

All you need to add is false in container argument to achieve this.So it will be something like container=>false.

But it will only work if you have correct theme_location. For an example, If you are using default menu in wordpress without creating any menu or without assigning any location to created menu, then above suggestion will not work.

So to make it work, create menu and assign location to it and make sure your wp_nav_menu also contains same location.

Edited

Replace your theme's header.php Line 21 with following code:

<?php wp_nav_menu( array( 'theme_location' => 'main-menu', 'container'=>false, 'menu_class'=> 'your_class_name' ) ); ?>

You can use the container argument to declare if you want to use a div or ul.

$args = array(
    'theme_location' => 'main-menu',
    'container' => 'ul'
);

echo wp_nav_menu($args);