Hello! This is my first post here on the CodeNewbie Forem and I'm kicking it off with a very beginner question. I'd love your thoughts!
Is there any way to select the parent of an element in CSS only?
Thanks 🙏
Hello! This is my first post here on the CodeNewbie Forem and I'm kicking it off with a very beginner question. I'd love your thoughts!
Is there any way to select the parent of an element in CSS only?
Thanks 🙏
For further actions, you may consider blocking this person and/or reporting abuse
Lanre Fagbeyiro -
Toqeer Abbas -
zakiAzfar -
Candice Tullis (She/Her) -
Once suspended, reggie_hazel will not be able to comment or publish posts until their suspension is removed.
Once unsuspended, reggie_hazel will be able to comment and publish posts again.
Once unpublished, all posts by reggie_hazel will become hidden and only accessible to themselves.
If reggie_hazel is not suspended, they can still re-publish their posts from their dashboard.
Once unpublished, this post will become invisible to the public and only accessible to Regina.
They can still re-publish the post if they are not suspended.
Thanks for keeping CodeNewbie Community 🌱 safe. Here is what you can do to flag reggie_hazel:
Unflagging reggie_hazel will restore default visibility to their posts.
Latest comments (4)
Like @murkrage said, you can't do it at the present.
If you need to style an element when one of his children is focused there is an handy pseudo-class you can actually use. It is supported in all major browser (maybe all)
You can read more about it here:
developer.mozilla.org/en-US/docs/W...
Thank you!!
Currently there is no way of doing that with just CSS, unfortunately. There is a working draft for the ‘has()’ pseudo-class that does what you are looking for, but browser support is just not there. Read more about it here: developer.mozilla.org/en-US/docs/W...
In the meantime: what are you trying to achieve?
Thank you so much for this response! I'm trying to work with a menu via a CMS and I can't move the active element to
This is helpful, though :)
Some comments may only be visible to logged-in visitors. Sign in to view all comments.