I'd like to assign a style to a HTML element - but only in the event that the tag has some contents set.
Is this possible using pure CSS? Ideally I would like to avoid JS or server-side changes to the structure of the HTML itself.
I'd like to assign a style to a HTML element - but only in the event that the tag has some contents set.
Is this possible using pure CSS? Ideally I would like to avoid JS or server-side changes to the structure of the HTML itself.
CSS3 has an :empty
pseudo -class.
I can't see any way of doing this in pure CSS2.1.