The forums ran from 2008-2020 and are now closed and viewable here as an archive.
Home › Forums › CSS › [Solved] h1 inside p
It seems h1 inside p does not take styling via child selector. http://codepen.io/rohitanandrohit/pen/DixCl
Any reasons or suggestions?
Solved…
the DOM doesn’t match your source – it’s invalid markup. A cannot contain <hx>.
markup is corrected to this:
<
p> <h1>h1</h1> <h2>h2</h2>
so the p>h1 won’t match anything.