Z-index not working inside a table if there is an overflow-scroll on container

后端 未结 2 1903
名媛妹妹
名媛妹妹 2021-01-11 12:37

I\'m having a problem positioning an absolute div outside a table, I\'m not a big fan of table layout but I found an existing project with a table layout. The code is as fol

2条回答
  •  长发绾君心
    2021-01-11 12:55

    For z-index to work correctly, every element that has a z-index property must also have any position set ( e.g.position:relative ). Also, I'd assign the table a position and z-index for the two to compare.

提交回复
热议问题