IE8 overflow:auto with max-height

后端 未结 8 2087
鱼传尺愫
鱼传尺愫 2020-12-04 11:42

I have an element which may contain very big amounts of data, but I don\'t want it to ruin the page layout, so I set max-height: 100px and overflow:auto

8条回答
  •  清歌不尽
    2020-12-04 12:08

    Set max-height only and don't set the overflow. This way it will show scroll bar if content is more than max-height and shrinks if content is less than the max-height.

提交回复
热议问题