CSS: height- fill out rest of div?

前端 未结 7 1985
星月不相逢
星月不相逢 2020-12-10 10:13

i wonder if this is possible with simple css or if i have to use javascript for this?

i have a sidebar on my website. a simple div#sidbar it\'s normally about 1024px

7条回答
  •  佛祖请我去吃肉
    2020-12-10 10:46

    Sometimes a workaround might be:

    #rest {
      height: 100%;
      padding-bottom: 200px;
    }
    

    The div itself will be too high, but because of the padding its content will have the right height.

提交回复
热议问题