嗨,我得到了下面的部分视图,它将在 div 内显示控件,但控件创建的时间总是比 div 长,有没有更好的方法来控制 css 而不是硬编码每个控件的宽度?
<fieldset class="fieldsetthinner">
<div style="float: left; width: 10%"><p>@Html.EditorFor(model => model.decBeginQty)<p></div>
<div style="float: left; width: 10%"><p>@Html.EditorFor(model => model.decEndQty )<p></div>
<div style="float: left; width: 10%"><p>@Html.EditorFor(model => model.decBeginAmt )<p></div>
<div style="float: left; width: 10%"><p>@Html.EditorFor(model => model.decEndAmt )<p></div>
<div style="float: left; width: 20%"><p>@Html.EditorFor(model => model.tintFactorType)<p></div>
<div style="float: left; width: 10%"><p>@Html.EditorFor(model => model.decMaxBonus )<p></div>
<div style="float: left; width: 10%"><p>@Html.EditorFor(model => model.nvarMsg )<p></div>
<div style="float: left; width: 10%"><p>@Html.EditorFor(model => model.varVCode )<p></div>
</fieldset>
提前致谢