First item-page should be `.item-page`, but assuming that one was just a copy-paste typo. Well h1 is the first-child of item-page, rather than h2. If you’d want the h2 to get that style, maybe you would be looking for `:first-of-type` selector.
@landysaccount – :first-of-type is indeed handy but I’d recommend against using it for core styling at this point due to browser support. It might be better to use alternative (sneakier) selectors instead to get around that and ensure wide support.
Viewing 7 posts - 1 through 7 (of 7 total)
You must be logged in to reply to this topic.
*May or may not contain any actual "CSS" or "Tricks".