这是我的代码:
<div class="row">
<div class="col-xs-4">
<h2>Some header text</h2>
</div>
<div id="div1" class="col-xs-8">
<div class="pull-right">
@using (Html.BeginForm("ChangePageSizeAction", "myController"))
{
@Html.AntiForgeryToken()
<small>Page Size</small>
@Html.DropDownList("pageSize", null, htmlAttributes: new { @class = "form-control", onchange = "this.form.submit();" })
}
</div>
<div id="div2" class="pull-right" style="padding-right:10px">
@Html.PagedListPager(Model, page => Url.Action("Index", new { page }),
new PagedListRenderOptions()
{
MaximumPageNumbersToDisplay = 3,
DisplayPageCountAndCurrentLocation = true,
PageCountAndCurrentLocationFormat = "Page {0} of {1}",
})
</div>
</div>
</div>
这是输出:
我想将PagedListPager与DropDownList旁边的底部对齐,如下所示:
我尝试将div1
样式设置为position:relative
,将div2
样式设置为position:absolute; bottom:0
但不起作用。
答案 0 :(得分:0)
在Morpheus发表评论之后,我在他的jsfiddle示例中找到了差异,因此我在我的css类中发现了一个错误(margin:0)。
所以,抱歉错误的问题。