HTML Can't Change Height of Div

后端 未结 2 1783
我在风中等你
我在风中等你 2021-01-18 09:36

So I\'m working on a tic tac toe game but for some reason my divs won\'t change their height.

2条回答
  •  借酒劲吻你
    2021-01-18 10:05

    html, body { height: 100%; }
    #board { display: block; margin: auto auto; min-height: 100%; }
    

    To use percentages your html and body both need to be height 100% then your outer container (assuming it is #board here) needs to specify min-height to fill the document, and be display type of block.

提交回复
热议问题