How to make a div grow with content?

后端 未结 5 734
再見小時候
再見小時候 2021-02-05 01:40

Pertaining to html, how do I make a div container grow with the content instead of manually defining a width and height.

5条回答
  •  春和景丽
    2021-02-05 01:56

    If you used float it prevents

    to grow up with content so you can use clear after float and it will work.

    .clear-fix{ clear: both; }

提交回复
热议问题