Auto Div height depend on another one

后端 未结 3 1574
你的背包
你的背包 2021-01-15 12:09

I have the following scenario I want Div2 height to resize depend on the content of Div3 how I can do that ?

----------------------------------
.      DIV1          


        
3条回答
  •  心在旅途
    2021-01-15 12:30

    Try using the CSS attribute display: table-cell. See this jsFiddle.

    EDIT

    Using floats, try this updated jsFiddle
    Or equally this one. Both provide an elegant solution.

提交回复
热议问题