我有两个面板必须是相同的高度。对于面板的代码如下:设置面板高度与内容不完全填充面板
<asp:Panel ID="Panel1" GroupingText="Material" CssClass="material"
runat="server" >
<asp:RadioButtonList ID="RadioButtonList1" runat="server" >
<asp:ListItem Selected="True">Plastics</asp:ListItem>
<asp:ListItem Enabled="false">Glass</asp:ListItem>
</asp:RadioButtonList>
</asp:Panel>
<asp:Panel ID="Panel2" GroupingText="Material" CssClass="design"
runat="server" >
<asp:RadioButtonList ID="RadioButtonList1" runat="server" >
<asp:ListItem >SV</asp:ListItem>
<asp:ListItem ">Bifocal</asp:ListItem>
<asp:ListItem >Varifocal</asp:ListItem>
<asp:ListItem >Intermediate</asp:ListItem>
</asp:RadioButtonList>
</asp:Panel>
我有一个风格这两个板与下面的CSS:
.material{display:inline-block; float:left;max-height:200px;width:90px;overflow:hidden;}
.design {display:inline-block; float:left;max-height:200px;width:210px;overflow:hidden;}
通知我试图使高度相同。然而,由于panel1内容很少,所以面板边框的高度一直是200px。即使内容没有完全填满面板,我怎么能有相同的高度。
使用的高度,而不是最大高度? –
感谢您的快速响应。我有,但仍然没有改变。 –
如果您将此处或http://jsfiddle.net/粘贴生成的HTML代码,这将有所帮助。同时尝试设置显示屏来代替内嵌块 –