Placing a scrollable div below a fixed div of variable height

后端 未结 2 1230
旧时难觅i
旧时难觅i 2021-01-15 17:30

This is with respect to a mobile page in jquery mobile

I have 2 divs as follows within a parent div(data-role=header)

2条回答
  •  無奈伤痛
    2021-01-15 18:12

    CSS:

    .inner-topHeader-panel {
      width: 100%;
      height: auto;
      margin: 20;
      background: white;
      border-bottom: none;
      float: left;
      clear: both;
      top: 0;
      z-index: 1000;
    }
    .inner-centercontent {
      width: 100%;
      float: left;
      height: 600px;
      overflow: scroll;
      padding-bottom: 50px;
    }
    

    Plunker

    Will only scroll when height is smaller than inner content.

提交回复
热议问题