我只是希望我的listboc扩大屏幕的整个宽度,这种形象格是全宽,但列表框里面会不会扩大
所以在文本高亮显示的列表框中的“选择或一倍单击....“是不扩展屏幕的整个宽度的那个。内联或显示:内联块到每个3行和设置宽度:
标记
<div class="row" style="margin-left: 5px; margin-right: 5px; margin-top:10px;" id="divCommentBank">
<div class="table">
<div class="row" style="margin-top:0px; padding-top:0px;">
<div class="col-xs-5" style="width:200px; border:groove; margin-left: 20px">
<label style="width:100%">Comment Categories</label>
@Html.ListBoxFor(m => m.cM.CategoryList, new SelectList(Model.cM.CategoryList, "CategoryID", "Description"), new { @id = "listCommentCategory", @style = "height:168px; margin-top:5px; margin-bottom: 5px; width:190px" })
</div>
<div style="float: right; width:900px; border:groove; margin-right: 20px">
<div class="row" style="margin-top:5px; padding-top:0px;">
<div class="col-xs-4" style=" margin-left: 5px">
@Html.DropDownListFor(m => m.cM.HeaderList, new SelectList(Model.cM.HeaderList, "CommentID", "Comment"), new { @id = "ddlCommentHeaders", @style="width: 100%" })
</div>
<div class="col-xs-4">
Search:
@Html.TextBox("txtSearchHeader")
<button id="clear">X</button>
</div>
<div class="col-xs-1">
<button id="refresh">Refresh</button>
</div>
</div>
<div class="row" >
<div style="margin-left:5px" class=" col-xs-9">
Select or double-click on a comment to insert:
</div>
</div>
<div class="row" style="margin-top:5px">
<div style="margin-left:5px; " class=" col-xs-9">
@Html.ListBoxFor(m => m.cM.CommentsList, new SelectList(Model.cM.CommentsList, "CommentID", "Comment"), new { @id = "listComments", @style = "height:105px; margin-bottom:5px;" })
</div>
</div>
</div>
</div>
</div>
</div>
UPDATE
你能告诉我们一个演示链接,或codepen –
“@ Html.ListBoxFor()'生成的实际HTML是什么?什么是'row'和'col-xs-9'类?有没有其他可以应用于该元素的CSS? – nnnnnn