How to specify a style for a list item only if the item has a different <ul> inside otherwise the style should not be applied?

How to specify a style for a list item only if the item has a different list inside otherwise the style should not be applied? using only css.

See an example here http://jsbin.com/udora

I want to remove arrows from all other elements except “Articles” and “Blur past the 7th inning”

I realized that this is not possible with css of any working jquery solution with a demo?

+3
source share
3 answers

CSS (CSS-2 ).. descendant selector.. .. () .

, , .. Ascendant selector.. ( , )  , , CSS-2, CSS-3.
( .. ..)... , CSS-2..

+2

ul id - ,

#sitemap>li>li {
    type: apply-style;
}

EDIT:

#sitemap > li li- id = "sitemap" , #sitemap > li > li li- li id #sitemap.

css-

EDIT2:

, li ul,

#sitemap>li>ul>li {
}

, > .

. IE6.

+1

css, .

ul, -

li ul { foo: bar }

"",

li li ul { foo: bar }

, jquery

$('li:has(ul)').css('foo', 'bar');
0

Source: https://habr.com/ru/post/1727326/


All Articles