在下面picI我试图通过保持每个其他项目相同来增加ListBoxFor项目的大小。
以下是我的Html代码:
<div class="cf mpcontent_header">
<div class="col-md-2" style="width: 250px;">
<h4 style="font-size: 18px;">@Resources.LanguageStrings.ApproveOneOrAll</h4>
</div>
<div class="col-md-3 hidebtnmobile" style="width: 425px;">
<div class="col-md-8">
@Html.ListBoxFor(m => m.SelectedVendor, Model.GetVendorList(user.idCompany, user.SiteSelection), new { data_placeholder = Resources.LanguageStrings.SelectVendors })
</div>
<div class="col-md-4">
<button id="submitButton" class="btn large primary-bg" style="font-size: 12px;" onclick="selectAllComboItems('#SelectedVendor', false);return false;">@Resources.LanguageStrings.ClearAll</button>
</div>
</div>
<div class="col-md-3 hidebtnmobile" style="width: 425px;">
<div class="col-md-8">
@Html.ListBoxFor(m => m.SelectedStaff, Model.GetStaffMembers(user.idCompany, user.SiteSelection), new { data_placeholder = Resources.LanguageStrings.SelectStaff })
</div>
<div class="col-md-4">
<button id="submitButton" class="btn large primary-bg" style="font-size: 12px;" onclick="selectAllComboItems('#SelectedStaff', false);return false;">@Resources.LanguageStrings.ClearAll</button>
</div>
</div>
<div class="col-md-4 hidebtnmobile">
<button id=" add" class="btn large primary-bg button_float_right " style="font-size: 12px;" title="@Resources.LanguageStrings.AddWOTitle" onclick="location.href = '@Url.Action("AddWorkOrder")'">
@Resources.LanguageStrings.Add</button>
<button class="btn large primary-bg button_float_right btnPrint " style="font-size: 12px;" title="@Resources.LanguageStrings.PrintTitle">@Resources.LanguageStrings.MultiPrint</button>
<button class="btn large primary-bg button_float_right " style="margin-right: 10px; font-size: 12px;" title="@Resources.LanguageStrings.MultiApprove" onclick=" ApproveWorkOrders(); return false;">@Resources.LanguageStrings.MultiApprove</button>
<style type="text/css">
.tableActions .btn {
min-width: 45px;
margin-right: 2px;
}
</style>
<div class="tableActions">
<button class="btn large primary-bg" onclick="copyTableText($('#WorkOrderList'));">Copy</button>
<button class="btn large primary-bg" onclick="$('#WorkOrderList').tableToCSV();">CSV</button>
</div>
</div>
</div>
我通过使用width元素尝试了很多但没有运气。每当我将宽度从425增加到450时,它会将最后的按钮带到下一行,这是我不想要的。
使用的正确方法是什么?我希望&#34;清除所有&#34;之间的空间。和&#34;复制&#34;按钮减少。
非常感谢您的帮助。