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

后端 未结 4 1270
终归单人心
终归单人心 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:18

    #MainContentArea will always expand dynamically since its height is assigned as auto.

    Since both have the same width, #BottomContentArea will be pushed down.

    Instead of percentage, use exact widths.

提交回复
热议问题