- This topic is empty.
Viewing 1 post (of 1 total)
Viewing 1 post (of 1 total)
- The forum ‘CSS’ is closed to new topics and replies.
The forums ran from 2008-2020 and are now closed and viewable here as an archive.
Hello everyone!
I have a case where I think it would be great if you could assign a rule to objects that meet multiple conditions, like is having both of these classes.
So if something like this would work.
Off course, in this case it would be quite useless (just add an extra class .blueBackground), but say it shall depend on an ancestor, like:
then, you could use it for making elements with the background-class have different backgrounds, depending on the surrounding element, without having to use an extra class.
I hope you understand my thoughts, otherwise just tell me and I’ll try to explain in another way.
So, does it exist a solution for this?
Edit:
Or is it perhaps so that you can use hover on an element, that shall change another element that isn’t a child to the hovered element, like this:
Div A and B are siblings, and div ab and div bb are cousins.
Thanks in advance!