Get the App
SLTechnology News&Howtos  ›  Development  › 

How to solve the bug that select can not be covered by div in ie6

Shulou Source: shulou.com Published: 2022-06-03 06:37:35 10月03日 Update

This article mainly introduces how to solve the ie6 select can not be covered by div bug, the article is very detailed, has a certain reference value, interested friends must read it!

Use div to make masks or simulate pop-up windows, but under IE6, when there is a drop-down list box select element below div, the drop-down list box will scratch div and display on top of div. This problem will occur no matter what the value of z-index is set. The Z axis may be out of control due to the pop-up list of the drop-down list control. But IE6 has a magic logic, div can't cover select, but iframe can cover select, and div can overwrite iframe, so the solution is to wrap or cover the drop-down list box control with a higher Z-axis height of the Iframe element to bring it back to the normal Z-axis height!

Html is as follows:

Html code

The code is as follows:

Here is a lot of code, [url=www.k686.com] www.k686.com [/ url]

The code is as follows:

Here is a lot of code, [url=www.k686.com] www.k686.com [/ url]

The css code is as follows:

Html code

The code is as follows:

.aboxinitcss {

Position:absolute

Margin-top:0px

Margin-left:0px

Display:none

Background:#FFF

Border:solid # CCC 1px

Padding:30px

Z-index:9999

Width:620px;overflow:hidden

}

.ifhideselect {

Z-index:-1

Width:680px

Height:255px

Position:absolute

Border:0

Left:0

Top:0

}

.aboxinitcss {

Position:absolute

Margin-top:0px

Margin-left:0px

Display:none

Background:#FFF

Border:solid # CCC 1px

Padding:30px

Z-index:9999

Width:620px;overflow:hidden

}

.ifhideselect {

Z-index:-1

Width:680px

Height:255px

Position:absolute

Border:0

Left:0

Top:0

}

This bug can be solved.

The z-index of iframe must be set to a negative number, otherwise it will not be covered.

The above is all the contents of this article entitled "how to solve the bug in which select cannot be covered by div in ie6". Thank you for reading! Hope to share the content to help you, more related knowledge, welcome to follow the industry information channel!

Tags: Code drop-down height elements content controls articles pop-ups magic value interests methods packages reasons guys buddies that is time more knowledge Apple Docker Huawei Linux macOS MariaDB Microsoft MySQL NVidia OPPO Reno NVidia Shulou Tech Info Docker MariaDB Redmi