I want to select <p>
tag and set it some properties except when it's wrapped into <span>
tag.
How can I do that?
<div>
<p></p>
</div>
<div>
<span>
<p></p> // except this one - because it's warped into span tag
<span>
</div>
<div>
<div>
<p></p>
</div>
</div>
<ul>
<li>
<p></p>
</li>
</ul>
Maybe something like this:
p:not(span p) {
// CSS properties here
}
But the most of my website's user use old browsers like IE8 (as you know it doesn't support CSS3). So how can I do that?