3
<ul>
    <li class="sub"><a href="/katalog1/">catalog</a>
        <ul>
            <li class="dir"><a href="">subcatalog</a>               
                <ul>
                    <li><a href="">sublink</a></li>
                    <li><a href="">sublink</a></li>
                    <li><a href="">sublink</a></li>
                </ul>               
            </li>
            <li class="dir"><a href="">subcatalog</a></li>
            <li class="dir"><a href="">subcatalog</a></li>
        </ul>
    </li> 
    <li class="sub"><a href="">catalog</a></li>
    <li class="sub"><a href="">catalog</a></li>
    <li class="sub"><a href="">catalog</a></li>
    <li class="sub"><a href="">catalog</a></li>
</ul>

<style>

ul > li.sub:hover > ul{display:block;}
ul > li.sub:hover{
background: #fff url(../../images/arrow1.png) no-repeat 91% center;
border-bottom: 2px solid #e30613;
padding-right: 25px;
}
</style>

Tell me please how make that css

ul > li.sub:hover{
    background: #fff url(../../images/arrow1.png) no-repeat 91% center;
    border-bottom: 2px solid #e30613;
    padding-right: 25px;
    }

use li which have parent ul?

In my example I need that only <li class="sub"><a href="/katalog1/">catalog</a> can use it css.

Tell me please how make it?

Kara
  • 5,650
  • 15
  • 48
  • 55
  • There isn't a parent selector in CSS.. here is a jQuery solution.. http://jsfiddle.net/JoshC/FujwP/ – Josh Crozier Dec 25 '13 at 15:59
  • They ( the css brain trust) have resisted an upward (ascending) selector rule for years out of concerns with scoping being unpredictable. This is not an oversight on their part, though plenty of approaches have been formally proposed. – Anthony Dec 25 '13 at 16:24

0 Answers0