Reputation: 13113
Anyone knows of a way to nicely center or fix width of pagination links? Something like this would be ideal!
At the moment, I am using
str_replace( $big, '%#%', get_pagenum_link( $big ) ), 'format' => '?paged=%#%', 'current' => max( 1, get_query_var('paged') ), 'total' => $wp_query->max_num_pages, 'end_size' => 2, 'mid_size' => 3 ) ); ?>
So, when I'm at first page, my pagination links would like the following:
then on 4th page
then on 7th page
then on 2nd last page
In this example, I've made all the pagination links float: left
.
Had I not done that, the "Next >>" link would be too far on the right side.
Thanks a lot in advance!
Upvotes: 1
Views: 795
Reputation: 13113
Thanks to both @Scott and @shoaib akhunzada. Unfortunately, your suggestions don't work.
I've written some Javascript to dynamically centered the group of the pagination links (which change from time to time) and the width of my page (which is fixed).
Problem is now solved!
Upvotes: 0
Reputation: 45
control width frome here not in ".pagination" class remove width there in pagination class
/* ur css */
.side {
border: medium none;
float: left;
padding-left: 2px;
padding-right: 2px;
text-align: center;
width: 30px; /* change this */
Upvotes: 0