#1
  1. No Profile Picture
    Registered User
    Devshed Newbie (0 - 499 posts)

    Join Date
    Jun 2013
    Posts
    2
    Rep Power
    0

    Sub Navigation not lining up


    I am having a devil of a time trying to get my sub navigation to line up under the main navigation.

    /*--- header navigation ---*/
    div.header-wrapper{ z-index: 999; position: relative; }
    div.header-navigation-wrapper{ float: left; margin-left: 20px; margin-right: 60px; }
    div.header-navigation{ float: left; position: relative; }
    div.header-navigation ul.menu a{ white-space: nowrap; }
    div.header-navigation ul.menu{ margin-left: 0px; list-style: none; font-size: 13px; font-weight: 600; }

    @-moz-document url-prefix() {
    div.header-navigation ul.menu {
    font-weight: 400 !important;
    }
    }
    div.header-navigation ul.menu li{
    display: inline;
    float: left;
    margin-right: 10px;
    padding-top: 0px;
    padding-right: 10px;
    padding-bottom: 4px;
    padding-left: 20px;
    position: relative;
    }
    div.header-navigation ul.menu ul.sub-menu{
    display: none;
    list-style: none;
    margin: 0px;
    padding-bottom: 7px;
    z-index: 1000;
    position: absolute;
    top: 25px;
    padding-top: 0px;
    }
    div.header-navigation ul.menu ul.sub-menu li{ padding: 0px 25px 6px 20px; }
    div.header-navigation ul.menu ul.sub-menu ul{ top: auto; margin-top: -27px; padding: 16px 0px 10px; }

    div.first-header-navigation.with-border ul.menu{ border-right-width: 1px; border-right-style: solid; }
    div.first-header-navigation ul.menu li{ padding-left: 0px; }

    div.second-header-navigation ul.menu li{ padding-left: 40px; }
    div.second-header-navigation ul.menu li ul.sub-menu li{ border-left: 0px; padding-left: 20px; }




    Thanks in advance
  2. #2
  3. Contributing User
    Devshed Newbie (0 - 499 posts)

    Join Date
    Aug 2011
    Location
    The Pleiades
    Posts
    300
    Rep Power
    10
    Good evening,

    Can you post some HTML also?

    Also can you post it within code brackets? It's the '#' button in the interface.

    Kind regards,

    NM.
  4. #3
  5. No Profile Picture
    Registered User
    Devshed Newbie (0 - 499 posts)

    Join Date
    Jun 2013
    Posts
    2
    Rep Power
    0

    Thanks - it's php


    Code:
    /*--- header navigation ---*/
    div.header-wrapper {
    	z-index: 999;
    	position: relative;
    }
    div.header-navigation-wrapper {
    	float: left;
    	margin-left: 20px;
    	margin-right: 60px;
    }
    div.header-navigation {
    	float: left;
    	position: relative;
    }
    div.header-navigation ul.menu a {
    	white-space: nowrap;
    }
    div.header-navigation ul.menu {
    	margin-left: 0px;
    	list-style: none;
    	font-size: 13px;
    	font-weight: 600;
    }
     @-moz-document url-prefix() {
     div.header-navigation ul.menu {
     font-weight: 400 !important;
    }
    }
    div.header-navigation ul.menu li {
    	display: inline;
    	float: left;
    	margin-right: 10px;
    	padding-top: 0px;
    	padding-right: 10px;
    	padding-bottom: 4px;
    	padding-left: 20px;
    	position: relative;
    }
    div.header-navigation ul.menu ul.sub-menu {
    	display: none;
    	list-style: none;
    	margin: 0px;
    	padding-bottom: 7px;
    	z-index: 1000;
    	position: absolute;
    	top: 25px;
    	padding-top: 0px;
    }
    div.header-navigation ul.menu ul.sub-menu li {
    	padding: 0px 25px 6px 20px;
    }
    div.header-navigation ul.menu ul.sub-menu ul {
    	top: auto;
    	margin-top: -27px;
    	padding: 16px 0px 10px;
    	position: absolute;
    	left: 0px;
    }
    div.first-header-navigation.with-border ul.menu {
    	border-right-width: 1px;
    	border-right-style: solid;
    }
    div.first-header-navigation ul.menu li {
    	padding-left: 0px;
    }
    div.second-header-navigation ul.menu li {
    	padding-left: 40px;
    }
    div.second-header-navigation ul.menu li ul.sub-menu li {
    	border-left: 0px;
    	padding-left: 20px;
    }
    Code:
    <?php
    	// main menu
    	if( get_option(THEME_SHORT_NAME.'_enable_floating_menu', 'enable') == 'enable' ){
    		echo '<div class="navigation-wrapper">';
    		echo '<div class="navigation-container container">';
    		echo '<div class="menu-wrapper" id="main-superfish-wrapper">';
    		echo '<ul class="sf-menu">';
    		if( has_nav_menu('main_menu') ){
    			wp_nav_menu( array('container' => '', 'theme_location' => 'main_menu', 'items_wrap' => '%3$s' ) );
    		}
    		if( has_nav_menu('main_menu_2') ){
    			wp_nav_menu( array('container' => '', 'theme_location' => 'main_menu_2', 'items_wrap' => '%3$s' ) );
    		}
    		echo '</ul>';
    		echo '</div>';
    		echo '<div class="clear"></div>';
    		echo '</div>'; // navigation-container 
    		echo '</div>'; // navigation-wrapper 
    	}
    ?>

IMN logo majestic logo threadwatch logo seochat tools logo