Wrapper div height is 0 with floated elements inside

前端 未结 3 413
挽巷
挽巷 2020-12-14 19:41

I have a wrapper

which contains two inner
s that are floating.

3条回答
  •  挽巷
    挽巷 (楼主)
    2020-12-14 20:25

    The outer div is collapsing because the two child divs inside of it are floating. The easiest fix for this is to set overflow: hidden; on the outer div.

提交回复
热议问题