Home > Article > Web Front-end > 两个并列div高度相同的问题_html/css_WEB-ITnose
css div 撑大 CSS div 相邻的一起撑大
<div class="user_content"><ul><li > <div class="cer_one">名称</div> <div class="cer_two" id="namediv"><s:property value="user.userName"/></div> <div class="cer_one">简称</div> <div class="cer_two" id="chgdiv"><s:property value="user.shortName"/></div></li><li > <div class="cer_one">年龄</div> <div class="cer_two"><s:property value="user.age"/></div> <div class="cer_one">学号</div> <div class="cer_two" id="chgdiv"><s:property value="user.iden"/></div></li><li>......</li></ul></div
.user_content li{border-bottom : 1px #ccc solid;border-left : 1px #ccc solid;border-right : 1px #ccc solid;}.cer_one{ width:121px; text-align:right; margin:0px; padding-left:20px; line-height:34px;}.cer_two{ width:241px; text-align:left; margin:0px; padding-left:6px;line-height:34px;border-left: 1px #ccc solid;}
display:table-cell
ul{padding:0; margin:0;display:table;} ul li{ display:table-row;border-style:solid;border-color:#ccc;border-width:0 1px 1px 1px;} ul li:first-child{border-top-width:1px;} ul li div{ display:table-cell; line-height:34px}
这不是C#代码吧