ul > li (selector) doesn't work. What am I missing here?
/* Part 1 */
ul > li{
margin-top:30px;
}
/* Part 2 */
/* ul .test{
margin-top:30px;
} */
<ul>
<li class="test">item1</li>
<ul>
<li>subitem1</li>
<li>subitem2</li>
</ul>
<li class="test">item2</li>
<li class="test">item3</li>
</ul>
https://jsfiddle.net/gy5r3noh/
Shouldn't Part 1 and Part 2 in css be equal? But It isn't. ul > li should select all li children of ul (like class=test I created), but it doesn't work by ul > li.
` can't be a child of a `
– j08691 Apr 27 '17 at 16:15`