CSS分区高度100%

CSS分区高度100%,css,height,Css,Height,我一个包装里有三个div。 其中一个div包含我的内容class=“cont”此div具有动态高度。其他的div-navi-left和und-navi-right应该有一个像div-cont一样的高。我试过这个,但它不起作用。你能帮我吗 <div style="width:400px;"> <div class="navi-left" style="width:50px; height:100%; background:grey;"></div>

我一个包装里有三个div。 其中一个div包含我的内容
class=“cont”
此div具有动态高度。其他的div-navi-left和und-navi-right应该有一个像div-cont一样的高。我试过这个,但它不起作用。你能帮我吗

<div style="width:400px;">
    <div class="navi-left" style="width:50px; height:100%; background:grey;"></div>
    <div class="cont" style="width:80px; height:80px; background:blue;"></div>
    <div class="navi-right" style="width:50px; height:100%; background:green;"></div>
</div>

如果要查找高度相等的流体3柱布局,请选中

为了触发百分比高度,应该知道父对象的高度。此外,如果希望div全部显示在同一行上,则div应该内联显示

<div style="width:400px;height:80px;">
    <div class="navi-left" style="width:50px; height:100%; background:grey;"></div>
    <div class="cont" style="width:80px; height:80px; background:blue;"></div>
    <div class="navi-right" style="width:50px; height:100%; background:green;"></div>
</div>

小提琴手:

navi left和navi right也应该有80px。我该怎么做?如果div cont是动态的,我该怎么做?它应该重新调整大小到cont设置的适当长度。
div {display:inline-block;}