I have a little specific problem. This is my HTML structure:
<ul class="dropdown">
<li class="level-1">Element 1 Level 1</li>
<li class="level-2">Element 1 Level 2</li>
<li class="level-2">Element 1 Level 2</li>
<li class="level-2">Element 1 Level 2</li>
<li class="level-1">Element 2 Level 1</li>
<li class="level-1">Element 2 Level 1</li>
<li class="level-1">Element 2 Level 1</li>
<li class="level-2">Element 2 Level 2</li>
<li class="level-2">Element 2 Level 2</li>
<li class="level-2">Element 2 Level 2</li>
<li class="level-2">Element 2 Level 2</li>
<li class="level-2">Element 2 Level 2</li>
<li class="level-1">Element 3 Level 1</li>
</ul>
Now, on Element 1 Level 1 hover, I need to display elements next to it with class level-2. Breakpoint is end of array of level-2 classes.
Expected result is showing every li
with text Element 1 Level 2
Problem with:
li.level-1 + li.level-2 { display: block; }
Is that it will display only next element, not every element with level-2
class.
This need to work like dropdown with nested levels, but with this kind of structure.
Problem is that I need to solve this only with CSS or CSS3.