Question

i making a navigation with wordpress. i want to make a navigation like this http://www.technikonus.lt/en (vertical navigation in the left). there are parent and submenu items...

I do not know what I have a problem. With css or should I change something in wordpress menu walker.

That's what I get now: Its ok with parent items

But with sub-items i have a trouble because dont know how to align li items when appears sub-menu items:

<li>
<ul><li></li></ul>
</li>

so this is how looks like my menu now http://jsfiddle.net/Yu8fg/

Was it helpful?

Solution

DEMO

CSS

.menu li {
    background: url('img/li_bullet.png') 16px no-repeat;
    list-style: none;
    border-bottom: 2px solid #e6e6e6;
    width: 190px;

    display: block;

} 

.menu > li{
    padding-left: 32px;
}

as css inherits by children from parent so padding-left: 32px; was applying to submneu li as well so by using ">" selector we have limited it apllication only to .menu li and wont apply to submenu li

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top