• kamerakind

    (@kamerakind)


    Hey Folks.

    I have a problem with the menu of my site (johannes-amm.de)

    I want to transform the existing menu (vertically) in a horizontal style. I read this site https://codex.www.ads-software.com/Creating_Horizontal_Menus.

    Here’s my menu’s CSS:

    /* =Menu
    -------------------------------------------------------------- */
    
    #access { }
    
    #access ul {
    	list-style: none;
    	margin: 50px 0 0;
    }
    #access .menu-header li,
    div.menu li {
    	float: left;
    	position: relative;
            display: inline;  <--------------------
    }
    #access a {
    	color: #666;
    	text-decoration: none;
    	font-size: 14px;
    	text-transform: uppercase
    }
    #access a:hover {
    	color: #666;
    	text-decoration: underline;
    	font-size: 14px;
    	text-transform: uppercase
    }
    
    .blog #access ul li#menu-item-329 > a,
    .single #access ul li#menu-item-329 > a,
    #access ul li.current_page_item > a,
    #access ul li.current-menu-ancestor > a,
    #access ul li.current-menu-item > a,
    #access ul li.current-menu-parent > a,
    #access ul li.current-cat > a {
    	color: #000;
    }
    * html .blog #access ul li#menu-item-329 > a,
    * html .single #access ul li#menu-item-329 > a,
    * html #access ul li.current_page_item a,
    * html #access ul li.current-menu-ancestor a,
    * html #access ul li.current-menu-item a,
    * html #access ul li.current-menu-parent a,
    * html #access ul li a:hover {
    	color: #fff;
    }

    I added display: inline according to the FAQ site. But nothing happens. Any hint? Anybody? Thanks!

Viewing 2 replies - 1 through 2 (of 2 total)
  • Try adding the following code somewhere under your /* Menu — */ styling:

    #menu-navigation li {
    display: inline-block;
    margin-right: 20px;
    }
    #menu-navigation {
    padding-bottom: 57px;
    }

    As you can see the menu is targeted through a different id.
    margin-right is added to space out the menu items. Increase its value if you want more spacing, decrease it otherwise.
    padding-bottom is added to place the full-size dotted line under your header (above “Der Leipziger…”) to the same place as it was with the old menu styling. You can change it to see the difference.

    Thread Starter kamerakind

    (@kamerakind)

    Sorry for my very late answer. your code worked just fine – thanks alot!!!

Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘fail to create horizontal menu’ is closed to new replies.