CSS Float does not stretch Div Height

前端 未结 4 1887
慢半拍i
慢半拍i 2021-02-03 15:42

I have had this problem for a long time when working with HTML/CSS and Floats.

In the image you can see I have a Box Div that is Floated left as there is many of these B

4条回答
  •  甜味超标
    2021-02-03 15:46

    Try applying overflow:auto to the container, the one whose height you want to resize based on the height of its contents (the floated items).

    I'd add a jsfiddle link but it's not been working at all for me recently. :/

提交回复
热议问题