How do I change a vertical menu to horizontal? (6 posts)

  1. lickeverything
    Posted 3 years ago #

    I'm not sure if I should be changing the CSS, the html, or both. My html looks like this:

    <div class="secondary-navigation">
    				<nav id="navigation" >
    					<?php if ( has_nav_menu( 'primary-menu' ) ) { ?>
    						<?php wp_nav_menu( array( 'theme_location' => 'primary-menu', 'menu_class' => 'menu', 'container' => '' ) ); ?>
    					<?php } else { ?>
    						<ul class="menu">
    							<?php wp_list_categories('title_li='); ?>

    Any suggestions?

  2. WPyogi
    Forum Moderator
    Posted 3 years ago #

    Generally, it would be in the CSS code, but without seeing the site, hard to say for sure.

  3. lickeverything
    Posted 3 years ago #

    ahhh ok, here's the site if that helps


  4. WPyogi
    Forum Moderator
    Posted 3 years ago #

    Removing the "float" attributes in the CSS for the menu will make it vertical -- look for these selectors:

    #navigation ul li
    #navigation ul

    It's highly recommended that you do not make changes to a theme's files as your changes will get overwritten when the theme is updated. Use a custom CSS option or plug-in or create a child theme.

    You may also want to ask your question on the developer's forums for your theme:


  5. mojo48v53
    Posted 3 years ago #

    My main menu on the home page changed from horizontal to vertical.

    How can I get it back horizontal? Thank you.

  6. Pioneer Web Design
    Posted 3 years ago #


    It is always advised to create your own post.


Topic Closed

This topic has been closed to new replies.

About this Topic