I have a simple problem. I have exact same divs (without texts) inside another. I want to style outer csseffect with children, but not inside cssffect.
Let me show you.
Example CSS:
.cssEffect .bold{font-weight: bold;}
//Super Secret Faraday Code
Example HTML:
<div class="cssEffect effected">
<span class="bold">Hey I'm Red!</span>
~~ some random stuff ~~
<div class="cssEffect faraday">
<span class="bold">I shouldn't be bold.</span>
~~ some random stuff ~~
</div>
</div>
And I expect something like this:
Hey I'm Bold
I shouldn't be bold.
But I cant figure out how. I thought I can do something like this:
.cssEffect .bold + .cssEffect.faraday{
//I dont really know what I should write here for not styling here
}
And I thought if I could change the code like this it would solve:
.cssEffect:not(.faraday) .bold{font-weight: bold;}
But the outer div effects inner one. I couldnt figure out how to solve this.
Any Ideas?
Thanks for your help!
Edit: And no, I know "!important" means. I dont want to ignore all styles, I just want to make that inside a div.