WordPress.org

Ready to get started?Download WordPress

Forums

WP-PageNavi
How to center WP-PageNavi (5 posts)

  1. Caleb Withers
    Member
    Posted 3 years ago #

    Hi, I want to center the WP-PageNavi Navigation on my website http://djsilkworm.com (running the theme Mystique, presumably with css, but I can't quite seem to get it to work.
    Currently I'm using

    .page-navigation{
      margin-left: auto ;
      margin-right: auto ;
    }​

    But it's still left aligned.
    Cheers for your help :)

    http://wordpress.org/extend/plugins/wp-pagenavi/

  2. alchymyth
    The Sweeper & Moderator
    Posted 3 years ago #

    in style.css:

    .page-navigation a, .page-navigation span.current, .page-navigation span.extend,
    .comment-navigation a, .comment-navigation span.current, .comment-navigation span.dots{
      padding: 3px 5px 4px 5px;
      margin: 2px;
      float: left;
    }

    the 'float: left;' is overwriting any attempt to center the navi.
    remove the float: left;

    (alternatively, depending on the way css edits are done in mystique, you may need to add this to the custom css:

    .page-navigation a, .page-navigation span.current, .page-navigation span.extend,
    .comment-navigation a, .comment-navigation span.current, .comment-navigation span.dots{
        float: none;
    }

    also edit your style:

    .page-navigation{
      margin-left: auto ;
      margin-right: auto ;
    }​

    and add: text-align: center;

  3. Caleb Withers
    Member
    Posted 3 years ago #

    Thanks for the response :D
    It didn't work :(

  4. mamouneyya
    Member
    Posted 3 years ago #

    Simply:
    text-align: center;

  5. reganmac
    Member
    Posted 3 years ago #

    Thanks alchymyth, your answer was perfect. Works for me with the Mystique theme.

Topic Closed

This topic has been closed to new replies.

About this Plugin

About this Topic