• Seantf22

    (@seantf22)


    I want to make a sub menu but when i drag it a lil to the right in my menu creator it just goes straight underneath it and than i dont get a hover ??

    Any 1 who can help me?

    This is the code for my menu:

    Code of my css:

    /* nav menu's */
    
    .site-nav ul{
    	margin:0;
    	padding:18px 10px;
    	background-color: black;  
    
    }
    
    .site-nav ul:before .site-nav ul:after {content:""; display:table;}
    .site-nav ul:after{clear:both;}
    
    .site-nav ul li{
    	list-style:none;
    	display:inline;
    
    }
    
    /* Site Header Menu */
    
    .site-header nav ul li a:link,
    .site-header nav ul li a:visited{
    
    	display:inline;
    	line-height: 20px;
    	padding:10px 18px;
    	text-decoration: none;
    	color:white;
    
    }
    
    .site-header nav ul li a:hover{
    	background-color: white;
    	color:black;
    
    }
    
    .site-header nav ul li.current-menu-item a:link,
    .site-header nav ul li.current-menu-item a:visited{
    	background-color: white;
    	color:black;
    }

    Header.php

    <nav class="site-nav">
    				<?php
    				$args =array(
    					'theme_location' => 'primary'
    					);
    					?>
    			<?php wp_nav_menu($args);?>
    	</nav>

    Functions.php

    register_nav_menus(array(
    'primary' => __('Primary Menu')
    	));

    Can some 1 tell me how i can fix this?:
    This i get
    Home
    Winkel
    Blog FaQ Locatie Contact

    This i want

    Home Blog Faq Locatie Contact
    Winkel

    Winkel shoud be a sub menu of Home that i want for a example

    Would really appreciate it if u could tell me how i can fix this
    Cheers alot ??

Viewing 11 replies - 1 through 11 (of 11 total)
  • Andrew Nevins

    (@anevins)

    WCLDN 2018 Contributor | Volunteer support

    Which theme has the issue?

    Thread Starter Seantf22

    (@seantf22)

    Custom theme

    Andrew Nevins

    (@anevins)

    WCLDN 2018 Contributor | Volunteer support

    Then without a link to a Webpage with the problem it’s unlikely any one can help you.

    Thread Starter Seantf22

    (@seantf22)

    ok sec i will make the mistake on the webpage and post it

    Thread Starter Seantf22

    (@seantf22)

    Andrew Nevins

    (@anevins)

    WCLDN 2018 Contributor | Volunteer support

    Add this CSS:

    .site-nav ul ul {
        display: none;
    }
    
    .site-nav ul li,
    .site-nav li:hover ul {
        display: inline-block;
        position: relative;
    }
    
    .site-nav li:hover ul {
        position: absolute;
        top: 100%;
        left: 0;
    }

    Thread Starter Seantf22

    (@seantf22)

    Thanks for the help 1 short question how to fix the following:

    Under collection
    I have now the Ringen and Kettingen But as u can see it is really hard to click on it do u have any idea how i can fix this ?:S

    Srry if i ask so much

    Thanks for helping!!!!!!

    Andrew Nevins

    (@anevins)

    WCLDN 2018 Contributor | Volunteer support

    Display your submenu links ‘block’, otherwise there’s no hope adding padding to them

    Thread Starter Seantf22

    (@seantf22)

    I dont get it ??

    I am terrible at this :X

    Andrew Nevins

    (@anevins)

    WCLDN 2018 Contributor | Volunteer support

    Looks like you did it ??

    Thread Starter Seantf22

    (@seantf22)

    But when i hover over it and try to select the child :S i cant click on it

Viewing 11 replies - 1 through 11 (of 11 total)
  • The topic ‘Nav bar sub menu's’ is closed to new replies.