I have a problem. There is such code:
.hover { width: 100%; background: red; height: 50px; position: absolute; top: 0; left: 0; } .hover:hover { height: 100px; } select { margin-top: 50px; } <div class="hover"></div> <select name="" id=""> <option value="">123131231232131</option> <option value="">131231231312122</option> <option value="">31231313131313</option> <option value="">13131313131314</option> <option value="">51232131313123</option> </select>
If you hover on the top block, it increases the height and overlaps the select. But, if the option list is open, it overlaps this block. How can this be fixed?
PS z-index is not suitable for this.
Upd: Correct that the list of options over the hover block is necessary for it to be under it. Upd2: Now it looks like this
It is necessary that the list of options is under the block
z-index? - Evgeny Nikolaev