height 100% doesn't work, two divs inside div

后端 未结 8 1546
伪装坚强ぢ
伪装坚强ぢ 2021-01-22 19:45

See css: http://jsfiddle.net/4JgA4/114/

Also here:

8条回答
  •  时光说笑
    2021-01-22 20:07

    The example below illustrates how to assign 100% height or width to a div contained inside other divs

    HTML Code:

    Hello World

    CSS Code:

    html,body{height:100%;}
    
    .container {
         height:100%;
    }
    
    .fill{
       width:100%;
       height:100%;
       min-height:100%;
       background-color:#990000;
       padding:10px;
       color:#efefef;
    }
    

提交回复
热议问题