WordPress Development Stack Exchange is a question and answer site for WordPress developers and administrators. It's 100% free, no registration required.

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

i'm new to creating wordpress themes and want a menu at the Top of my page. I do have the following: Header.php

<title>Tutorial theme</title>
<link rel="stylesheet" href="<?php bloginfo('stylesheet_url'); ?>">
<div id="wrapper">
<?php wp_nav_menu( array('menu' =>'Top Navi', 'container' => '', 'items_wrap'  => '<ul id="menu-primary" class="menu" >%3$s</ul>'  ) ); ?>
<div id="header">


add_theme_support( 'menus' );
if (function_exists('register_nav_menus')) {
        'main_nav' => 'Main Navigation Menu'

And finally my css file http://pastebin.com/Pjr3THJm

However my menu comes out in a list, not horizontally. What am i doing wrong?

share|improve this question
This is a CSS-specific question, not a WordPress question. (Side note: use theme_location rather than menu in your wp_nav_menu() call.) – Chip Bennett Mar 11 '13 at 15:06
@ChipBennett Sorry about that then, was not aware it was an css specific issue – Stingervz Mar 11 '13 at 15:08
up vote 1 down vote accepted

In my opinion, this is a CSS-only question.

You have to provide the <li> elements in your menu with the CSS style display: inline; (or 'inline-block').

share|improve this answer
I have no idea how to access the <li> elements as far as i can see i can only get to the <ul> element – Stingervz Mar 11 '13 at 15:11
Found it! had to add #menu-primary li { display: inline; } to my css file. Thanks! – Stingervz Mar 11 '13 at 15:16

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.