user2970202
user2970202

Reputation: 377

How to center pagination?

You can view the page I'm working on here: http://stats.escalatehosting.com/whois.php

The problem I'm having is that I just can't figure out what CSS needs to be changed to center the page numbers located at the top and bottom of the page. I've tried changing everything I can think of but it always ends up off-center when you start clicking to pages with larger numbers...

I'm not really sure what needs to be changed, if anyone has any suggestions, that would be greatly appreciated.

Upvotes: 1

Views: 673

Answers (2)

Viken Patel
Viken Patel

Reputation: 446

You need to update below Class.

#ct1_pager_container, #ct2_pager_container{
    width:100%;
}
#ct1_pager, #ct2_pager{
    float:none;
    text-align:center;
}

Update only given element. don't update whole CSS. keep everything else as it is.

Upvotes: 0

Mr. Alien
Mr. Alien

Reputation: 157334

As you commented, center is not a valid value for float property, either you can use left, right or none which is default.

On creative2tables line 167 change your CSS as provided below..

#ct1_pager_container, #ct2_pager_container {
   margin-bottom: 15px;
   clear: right; /* Not sure if required */
   width: 300px;
}

And in the same stylesheet on line 174 change the below as

#ct1_pager, #ct2_pager {
   clear: both;
   list-style: none;
}

I've changed the above properties to center your pagination, please do check if you are using these id's for any other element as well.

Upvotes: 1

Related Questions