Comments on: :only-child https://css-tricks.com Tips, Tricks, and Techniques on using Cascading Style Sheets. Thu, 08 Aug 2019 21:02:46 +0000 hourly 1 https://wordpress.org/?v=6.2.2 By: Sergio Pinna https://css-tricks.com/almanac/selectors/o/only-child/#comment-1600925 Wed, 13 Apr 2016 16:11:38 +0000 http://css-tricks.com/?page_id=14242#comment-1600925 Hi,

how can I match this (when “strong” is the only child of “p” and “p” is without text ):

<div><p><strong>lorem ipsum</strong></p></div>

but not this (when “p” has text also):

<div><p>lorem ipsum<strong>lorem ipsum</strong>lorem ipsum</p></div>

Thank you very much!

]]>
By: Yeswanth https://css-tricks.com/almanac/selectors/o/only-child/#comment-1596693 Mon, 31 Aug 2015 10:16:29 +0000 http://css-tricks.com/?page_id=14242#comment-1596693 Thanks…! Very rare known property…

]]>