Extending position absolute div outside overflow hidden div

前端 未结 5 904
伪装坚强ぢ
伪装坚强ぢ 2021-02-18 23:17

I\'ve haven\'t done css in several month so I might miss something simple, but whatever the solution is, I couldn\'t figure it out. So here is the problem.

Here is simpl

5条回答
  •  不知归路
    2021-02-19 00:10

    Only option is to move that div outside of the overflow:hidden div. You can't say hide everything in this div that overflows -- except for this one div... let's make an exception.

    You can introduce one more layer in your hierarchy, whereby the inner div is overflow hidden and the outer div is not. Then place that positioned element in the outer div. A pseudo example would be:

    ....

    If by chance you had positioning on the old div with overflow:hidden, you would move that setting to the outer div, allowing things to position properly.

    So the short answer: no solution will allow you to do what you want without either changing your CSS to not be overflow:hidden or without changing your markup.

提交回复
热议问题