How to properly set the 100% DIV height to match document/window height?

前端 未结 9 1839
难免孤独
难免孤独 2021-01-30 04:53

I have a wrapper positioned to center with an y-repeated background image:


    
...some content
&
9条回答
  •  佛祖请我去吃肉
    2021-01-30 05:07

    You could make it absolute and put zeros to top and bottom that is:

    #fullHeightDiv {
        position: absolute;
        top: 0;
        bottom: 0;
    }
    

提交回复
热议问题