Forums

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

Home Forums CSS Trying to select a non-specific div using its child Reply To: Trying to select a non-specific div using its child

#183818
__
Participant

You’re welcome. And just in case you’re interested, it’s not that no one thinks a parent selector wouldn’t be useful, it’s just that it’s difficult to implement with the way CSS works internally. The CSS4 spec has :has(). There was also a “subject selector” which allowed you to choose which part of a combination selector was the subject of the rule (as opposed to the last element automatically being the subject), but it seems they removed it.