How to dynamically increase the height of a
based on the contents?

后端 未结 4 1272
终归单人心
终归单人心 2021-01-20 11:52

I have a div on a page that I need to put content into. Sometimes the content is a few lines high, and sometimes the content is more than the screen height with varying size

4条回答
  •  说谎
    说谎 (楼主)
    2021-01-20 12:11

    Resizing vertically to fit the content is the expected behavior. If you have specified floats somewhere in your css you may need to clear them:

提交回复
热议问题