Nathan Srivi Nathan Srivi - 1 month ago 5
CSS Question

How to call css into div class inner div?

I am working in web scraping. Now i am scraping one website and load into my website its working fine. But i need to add css into one div. This div does not contain any

id or class
.

But my main div contain class. How can i css for my inner div

For example:

<div class="ct-ui-spinner-animation">
<div>
<div> <!-- I Want to call css in this div-->
Sample
</div>
</div>
</div>


I am trying this ways

First try:

.ct-ui-spinner-animation > div
{
color:#fff !important;
}


Second try

.ct-ui-spinner-animation {
color:#fff !important;
}


But not applying css please guide me. How can i do it.

Answer

Your code was almost there.

You need to use two child selectors:

.ct-ui-spinner-animation > div > div
{
    color:#fff !important;
}

Notice this will be applied for all the div elements which are the grandchildren of any element with the .ct-ui-spinner-animation class.

Comments