Cannot control wp_nav_menu properly

As toscho pointed out the container argument should be left out or set to an empty string, and a menu should be created and assigned to the menu location (primary in this example).

How we show pages in dropdown

Use wp_dropdown_pages(): print ‘<form action=”‘ . home_url() . ‘”>’; wp_dropdown_pages(); print ‘<input type=submit></form>’; You get a select field with proper indentation, and clicking on the button will send the user to that page.