I have a dropdown type list that will get hidden after specific device width and by default, the dropdown box will be visible so the user is not able to collapse it.
The default state for input is also hidden.
Suppose the device width is 804px, and the dropdown gets hidden and input gets visible. By clicking the input the user can see the contents of the dropdown.
But for some reason, I'm unable to target the dropdown box using the input field.
input[type="checkbox"]:checked~.team-lists {
display: flex;
height: 430px;
}
<div class="hireDevs">
<div class="headers">
<h2>Hire Developer Team</h2>
<label for="team-lists">
<input type="checkbox" class="add-lists" id="team-lists" hidden>
<i class="ri-add-fill"></i>
</label>
</div>
<div class="team-lists">
<a href="#">Android App Developers</a>
<a href="#">iOS App Developers</a>
<a href="#">Flutter App Developers</a>
</div>
</div>