字段集高度为其父级的100% [英] Fieldset height 100% of its parent
问题描述
我有一个< div>
包含的 fieldets
,我们称它们为 blah1
和 blah2
。
blah2
可以增加其< div>
parent,但我需要 blah1
具有相同的%兄弟的高度 blah2
答案很奇怪,但我使它工作,看起来像边缘在这里混乱,如果我设置为 css 标记的一部分: 希望它可以帮助别人... I have 2 The answer was kinda weird, but I make it work, looks like the margin was making a mess here, if I set it to Part of the css markup: If you wanna see the final demo, click here. Hope it can help somebody else... 这篇关于字段集高度为其父级的100%的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋! margin:0 5px; 然后我可以使两个
fieldsets
具有相同的 height
/ p>
fieldset
{
border:1px solid #ddd;
padding:0 1.4em 1.4em 1.4em;
margin:0 0 1.5em 0;
border-radius:8px;
margin:0 5px;
height:100%;
}
legend
{
font-size:1.2em;
font-weight:bold;
}
.blahContainer {
width:100%;
height:100%;
}
.blahColumna1 {
width:70%;
height:100%;
}
如果你想看最后的演示,点击这里。
fieldsets
wrapped in a <div>
, let's call them blah1
and blah2
. blah2
can grow as the max of its <div>
parent, but I need blah1
to have the same % height of his sibling blah2
margin: 0 5px;
then I can make both fieldsets
to have the same height
as their parentfieldset
{
border: 1px solid #ddd;
padding: 0 1.4em 1.4em 1.4em;
margin: 0 0 1.5em 0;
border-radius: 8px;
margin: 0 5px;
height: 100%;
}
legend
{
font-size: 1.2em;
font-weight: bold;
}
.blahContainer{
width: 100%;
height: 100%;
}
.blahColumna1{
width: 70%;
height: 100%;
}