Jump to content

Archived

This topic is now archived and is closed to further replies.

AdRock

How to center pagination links on middle of page [RESOLVED]

Recommended Posts

Here is some code that displays the links in my pagaination but i would like them centered

Is there an easy way to do this?

[code]if($prev_page >= 1) {
  echo("<b>&lt;&lt;</b> <a href=/poem/$prev_page><b>Prev.</b></a>");
}

//Display middle pages: **EDIT LINK PATH**

for($a = 1; $a <= $total_pages; $a++)
{
   if($a == $page) {
      echo("<b> $a</b> | "); //no link
     } else {
  echo("<a href=/poem/$a> $a </a> | ");
     }
}

//next page: **EDIT THIS LINK PATH**

$next_page = $page + 1;
if($next_page <= $total_pages) {
   echo("<a href=/poem/$next_page><b>Next</b></a> &gt;&gt;");
} [/code]

Share this post


Link to post
Share on other sites
[code]
echo  '<div style="text-align: center;">'
        . implode(', ', $Paginations)
        . '</div>';
[/code]

Share this post


Link to post
Share on other sites

×

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.