0

I would like to ask you how to display parent-sibling div when parent-child hover I have this arrangement:

<div id="parent">
 <div id="child1">text1<div>
 <div id="child2">text1<div>
 .
 .
 .
</div>
<div id="sibling1>heading1</div>
<div id="sibling2>heading2</div>
.
.
.

Siblings are display:none and I need to display:unset right div:
child1:hover lead to display:unset for sibling1 and so on
I tried:

1) #child1:hover ~ #sibling1{display:unset;}
2) #parent #child1:hover ~ #sibling1{display:unset;}
3) #parent>#child1:hover ~ #sibling1{display:unset;}
4) #parent>#child1:hover + #sibling1{display:unset;}

Thank you for every good idea

Misso
  • 23
  • 4
  • cannot be done with your current structure as there is no css parent selector - css stands for cascading style sheets - always flow downwards. You would need to use js to do this – Pete Nov 08 '18 at 14:17
  • :-( pity, I wanted to avoid javascripts .... thank you – Misso Nov 08 '18 at 14:25

0 Answers0