[英]How to customize the jQuery DataTable Pagination Buttons and populate with several service calls
[英]how to left align the Jquery datatable pagination buttons
關於如何左對齊 Jquery 數據表分頁按鈕的任何想法? 默認情況下,頂部按鈕居中對齊,底部按鈕右對齊。 有任何想法嗎?
您需要使用 important 來覆蓋應用於分頁器的現有樣式。
.dataTables_paginate {
float: left !important;
}
div.dataTables_paginate { float: left; margin: 0; }
應該做的div.dataTables_paginate { float: left; margin: 0; }
。
這是我對默認數據表(無dom
/ datatable
設置) sDom
的操作,以便分頁控件位於x of y
信息下,兩個項目左對齊並位於表格底部:
Showing 1 to 25 of NN entries
First Previous 1 2 3 4 5 Next Last
我添加了這種風格:
<style type="text/css">
div.dataTables_info {
position: absolute
}
div.dataTables_wrapper div.dataTables_paginate {
float: unset;
text-align: left;
padding-top: 28px;
padding-bottom: 10px;
white-space: nowrap;
}
</style>
使用這些設置:
"bJQueryUI": true,
"iDisplayLength": 25,
"sPaginationType": "full_numbers",
"aLengthMenu": [[10, 25, 50, 100, 200, -1], [10, 25, 50, 100, 200, "All"]],
聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.