In my application I need to have notice/warning/error boxes (DIVs) that the user can close with a button located inside the box itself. A problem I'm facing is that the :has()
pseudo-class is not widely supported; otherwise I could do something like this:
.msgbox:has(.closeflag:checked) { display:none; }
(where .msgbox
is the external div and .closeflag
the checkbox with the close status).
Is there an alternative to do the same without using :has()
?