[Solved] What does “>” do in CSS [duplicate]


it’s a selector for children (not just any descendent).

The selector body > .navid would select the .navid div using the following:

<body>
    <div class="navid"></div>
</body>

But it would not select the .navid div below because it’s a grandchild

<body>
    <div>
        <div class="navid"></div>
    </div>
</body>

solved What does “>” do in CSS [duplicate]