Today, I am encountering an issue with restricting the application of CSS. The
<div class="parent">
<div id="childWithNoCss">
<p>No css</p>
</div>
<div id="childWithCss">
<p>Apply css</p>
</div>
</div>
Here is my current CSS:
div{
color:red}
p{
color:blue}
I am in need of applying the CSS specifically to the ID childWithCss. However, the CSS rules are fixed and cannot be altered, so I am looking for a way to limit its scope to only one element. Using the scope attribute is not an option as it is incompatible with some browsers. Do you have any suggestions or alternative solutions?
Best Regards