Forums

The forums ran from 2008-2020 and are now closed and viewable here as an archive.

Home Forums CSS [Solved] h1 inside p

  • This topic is empty.
Viewing 2 posts - 1 through 2 (of 2 total)
  • Author
    Posts
  • #168656
    godhoomrohit
    Participant

    It seems h1 inside p does not take styling via child selector.
    http://codepen.io/rohitanandrohit/pen/DixCl

    Any reasons or suggestions?

    #168660
    godhoomrohit
    Participant

    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.

Viewing 2 posts - 1 through 2 (of 2 total)
  • The forum ‘CSS’ is closed to new topics and replies.