Jump to content


Photo

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


  • Please log in to reply
1 reply to this topic

#1 AdRock

AdRock
  • Members
  • PipPipPip
  • Advanced Member
  • 911 posts

Posted 05 September 2006 - 08:20 PM

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?

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;"); 
}

If your topic has been solved, please mark the topic as SOLVED.

This helps others from identifying which topics need help still

#2 roopurt18

roopurt18
  • Staff Alumni
  • Advanced Member
  • 3,749 posts
  • LocationCalifornia, southern

Posted 05 September 2006 - 08:24 PM

echo   '<div style="text-align: center;">'
         . implode(', ', $Paginations)
         . '</div>';

PHP Forms : Part I | Part II

JavaScript: Singleton

http://www.rbredlau.com




0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users