Reputation: 1
<div style="color:#FFFFFF !important;">
<!-- A Dynamic content comes from from third party. -->
<p style="color:red;"> This should be white instead of red. </p>
<p>Test is test. This should also be white. </p>
<span> Check is check. This should also be white. </span>
<!-- Dynamic Content ends -->
</div>
HOW do I make all the texts to be white inside the div given above. Is it possible by using any jquery or other similar language??
Upvotes: 0
Views: 718
Reputation: 1
Finally Found answer.
$(div p).css('color':'white');
$(div span).css('color':'white');
This was what I exactly wanted. It overrided the inline css of all the p tag as well.
Upvotes: 0
Reputation: 3641
Using Jquery children()
and css()
function to override the style , check my FIDDLE
for the demo
Upvotes: 1