我想正確對齊引導的div內的控件,讓它們看起來像如何正確定位引導HTML的div
目前有很多的行和邊距或填充多年平均值之間的差距似乎工作。另外,如何擴展列表框以完全覆蓋屏幕的長度?它看起來像這樣
HTML
<div class="row" style="margin-left: 5px; margin-right: 5px">
<div class="table">
<div class="row" style="margin-top:0px; padding-top:0px; border:dotted">
<div style="float: left; margin-left:10px;">
@Html.ListBoxFor(m => m.cM.CategoryList, new SelectList(Model.cM.CategoryList, "CategoryID", "Description"), new { @id = "listCommentCategory" })
</div>
<div style="margin-left:100px; margin-top:0px;">
<div class="row" style="margin:0px; padding:0px; margin-bottom:0px; padding-bottom:0px; border:dashed">
<div class="col-md-1">
@Html.DropDownListFor(m => m.cM.HeaderList, new SelectList(Model.cM.HeaderList, "CommentID", "Comment"), new { @id = "ddlCommentHeaders" })
</div>
<div class="col-md-2" style="margin-left:10px">
Search:
@Html.TextBox("txtSearchHeader")
<button id="clear">X</button>
</div>
<div class="col-md-1" style="margin-left:10px">
<button id="refresh">Refresh</button>
</div>
</div>
<div class="row" style="margin-left:10px; border:dashed">
Select or double-click on a comment to insert:
</div>
<div class="row" style="margin-left:10px; border:dashed">
@Html.ListBoxFor(m => m.cM.CommentsList, new SelectList(Model.cM.CommentsList, "CommentID", "Comment"), "listComments")
</div>
</div>
</div>
</div>
</div>
哦,如果你想在列表框中擴大,寬度設置爲100% – demitinay
否2行中第二個div總是出故障 – Samra