Jquery boostrap列与字段集的高度相同
我的引导列具有字段集,我正在尝试为列设置相同的高度。对于相同的高度,我将在本文后面使用,但这适用于fieldset。我这里有个例子Jquery boostrap列与字段集的高度相同,jquery,css,twitter-bootstrap,Jquery,Css,Twitter Bootstrap,我的引导列具有字段集,我正在尝试为列设置相同的高度。对于相同的高度,我将在本文后面使用,但这适用于fieldset。我这里有个例子 即使您已为字段集设置了100%的高度,父级高度仍然未知。将父div容器高度设置为100%。您需要进行以下更改 CSS .row-same-height { display: table; width: 100%; /* fix overflow */ table-layout: fixed; height: 100%; } .col-xs-he
即使您已为字段集设置了100%的高度,父级高度仍然未知。将父div容器高度设置为100%。您需要进行以下更改 CSS
.row-same-height {
display: table;
width: 100%;
/* fix overflow */
table-layout: fixed;
height: 100%;
}
.col-xs-height {
display: table-cell;
float: none !important;
height: 100%;
}
为了使这两个元素的高度相同,您需要正确构造
表
数据。这意味着在行相同高度的类之后添加一个表行
DIV
<div class="row-same-height">
<div class="tablerow">
<div class="col-md-5 col-xs-height col-top">...</div>
<div class="col-md-5 col-xs-height col-top">...</div>
</div>
</div>
你可以。希望这会有所帮助。请不要回避关于链接到JSFIDLE的警告。在问题中包括相关代码。
.row-same-height {
display: table;
width: 100%;
table-layout: fixed;
height: 100%;
}
.tablerow {
display: table-row;
height: 100%;
}
.col-top {
vertical-align: top;
height: 100%;
}