Resize parent div to match absolutly positioned child div height

后端 未结 3 894
礼貌的吻别
礼貌的吻别 2020-12-20 07:01

I have a CSS problem:

I have an absolute positioned div in a container. The container won\'t resize to the height of the content. Why?

3条回答
  •  孤城傲影
    2020-12-20 07:21

    When something is absolutely positioned with CSS, it takes it out of the flow. When it's out of the flow, it won't be accounted for in height calculations.

提交回复
热议问题