'How to change specific div using #id>div>div but only one of the divs that are applicable are affected

How can you change the css of a specific div even if a bunch of parent divs do not have ids? You can do

#someid>div>div>div>div>div 

and I tried that, but it changes all the applicable divs at that level, not the one I want only. say there is ten divs that parent one div i want, and i use css like that to change the color. But there is another one of the same generation ( a sibling is it called) that also gets affected. imortant: there are no ids until that tenth one

css


Solution 1:[1]

first of all if you didn't share your code it's hard to find any solution. But Still if you're facing issue with CSS you can try inline CSS which will help you to achieve your goal. Inline CSS Like-

<div style="width:50%; text-align:center; justify-content:center;">Hello Josh</div>

In the above code style is inline CSS.

Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source
Solution 1 Varun Kaklia