0
分頁代碼工作得很好。但是,我遇到了CSS問題。分頁鏈接的位置真的只顯示我想要當用戶1.這是從瀏覽器的頂部2800個像素頁面上。造型分頁鏈接
對於通過N 2頁,還有的說我分頁HTML表的底部和分頁鏈接之間的間距約100額外的像素。 (一E.鏈接是從瀏覽器的頂部約2900像素)。
在n頁(最後一頁),分頁鏈接出現在瀏覽器頂部約5600個像素。這增加了我分頁的HTML表格底部和鏈接本身之間的大量空白區域。
任何想法,我怎麼可能使鏈接從瀏覽器的頂部,不管用戶什麼網頁是2800個像素?
由於提前,
約翰
分頁代碼:
if ($currentpage > 1) {
echo " <div class='pages'><a href='http://www...com/phoenix/index.php?currentpage=1' class='links'><<</a></div> ";
$prevpage = $currentpage - 1;
echo " <div class='pages'><a href='http://www...com/phoenix/index.php?currentpage=$prevpage' class='links'><</a></div> ";
}
for ($x = ($currentpage - $range); $x < (($currentpage + $range) + 1); $x++) {
if (($x > 0) && ($x <= $totalpages)) {
if ($x == $currentpage) {
echo " <div class='pages'>[<b>$x</b>] </div>";
} else {
echo " <div class='pages'><a href='http://www...com/phoenix/index.php?currentpage=$x' class='links'>$x</a></div> ";
}
}
}
if ($currentpage != $totalpages) {
$nextpage = $currentpage + 1;
echo " <div class='pages'><a href='http://www...com/phoenix/index.php?currentpage=$nextpage' class='links'>></a></div> ";
echo " <div class='pages'><a href='http://www...com/phoenix/index.php?currentpage=$totalpages' class='links'>>></a></div> ";
}
的CSS:
.pages
{
color: #000000;
overflow: hidden;
display: block;
float: left;
margin: 4px;
margin-top: 2800px;
margin-bottom:0px;
margin-left: 10px;
padding-bottom: 0px;
font-family: Georgia, "Times New Roman", Times, serif;
font-size: 24px;
}
a.links:link {
color: #004284; text-decoration: none;
text-align:center;
margin-left:8px;
margin-bottom:0px;
padding:2px;
font-family: Georgia, "Times New Roman", Times, serif;
font-size: 24px;
}
a.links:visited {
color: #004284; text-decoration: none;
text-align:center;
margin-left:8px;
margin-bottom:0px;
padding:2px;
font-family:Georgia, "Times New Roman", Times, serif;
font-size: 24px;
}
a.links:active {
color: #004284; text-decoration: none;
text-align:center;
margin-left:8px;
margin-bottom:0px;
padding:2px;
font-family:Georgia, "Times New Roman", Times, serif;
font-size: 24px;
}
a.links:hover {
color: #FFFFFF; text-decoration: none;
background-color: #004284;
text-align:center;
margin-left:8px;
margin-bottom:0px;
padding:2px;
font-family:Georgia, "Times New Roman", Times, serif;
font-size: 24px;
}