Warning: file_get_contents(/data/phpspider/zhask/data//catemap/3/html/82.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181

Warning: file_get_contents(/data/phpspider/zhask/data//catemap/3/gwt/3.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Css 将div height设置为100%_Css_Html - Fatal编程技术网

Css 将div height设置为100%

Css 将div height设置为100%,css,html,Css,Html,我有4个div的位置像在图片中看到的那样。Div1、Div 2和Div 3放在页脚Div中。3个Div的内容是动态的,我不知道它们需要什么高度。如何将这3个div的高度设置为相同的值? 我已经尝试过不同的解决方案,比如将top和button设置为0px,正如这里提到的: 这就是我目前拥有的: 这是我的HTML布局: <div class="About"> <div class="RightAbout"> </div> <div class="Cent

我有4个div的位置像在图片中看到的那样。Div1、Div 2和Div 3放在页脚Div中。3个Div的内容是动态的,我不知道它们需要什么高度。如何将这3个div的高度设置为相同的值? 我已经尝试过不同的解决方案,比如将top和button设置为0px,正如这里提到的:

这就是我目前拥有的:

这是我的HTML布局:

<div class="About">
<div class="RightAbout">
</div>
<div class="CenterAbout">
</div>
<div class="LeftAbout">
</div>
</div>
像这样

css

body, html {
  height: 100%;
}


.About
{    
    padding:0px;
    background-color:#757575;
    border:none;
    min-height:250px;
    color:White;
    font-size:12pt; 
    display:table;
}
.RightAbout
{
    display:table-cell;
    width:290px;
    min-height:100%;
    border-left:solid 1px #CDCDCD;
    margin:0px 0px 0px 0px;
    padding:0px 5px 0px 5px;
    vertical-align:top;
    background-color:blue;
}


.CenterAbout
{
    display:table-cell;
    width:290px;
    min-height:100%;
    border-left:solid 1px #CDCDCD;

    vertical-align:top;
     background-color:#757575;
}
.LeftAbout {
   display:table-cell;
    min-height:100%;
    border: none;
    width:290px;

    vertical-align: top;
     background-color:#757575;
}
像这样

css

body, html {
  height: 100%;
}


.About
{    
    padding:0px;
    background-color:#757575;
    border:none;
    min-height:250px;
    color:White;
    font-size:12pt; 
    display:table;
}
.RightAbout
{
    display:table-cell;
    width:290px;
    min-height:100%;
    border-left:solid 1px #CDCDCD;
    margin:0px 0px 0px 0px;
    padding:0px 5px 0px 5px;
    vertical-align:top;
    background-color:blue;
}


.CenterAbout
{
    display:table-cell;
    width:290px;
    min-height:100%;
    border-left:solid 1px #CDCDCD;

    vertical-align:top;
     background-color:#757575;
}
.LeftAbout {
   display:table-cell;
    min-height:100%;
    border: none;
    width:290px;

    vertical-align: top;
     background-color:#757575;
}

你似乎和这个人有同样的问题:

这将解决您的问题,并有助于将来解决类似问题:


你似乎和这个人有同样的问题:

这将解决您的问题,并有助于将来解决类似问题:


为什么您需要相同的高度?为什么你需要有相同的高度?