0
我很難將CSS應用於某些分頁鏈接。我想鏈接到頁面的底部水平顯示,居中:造型分頁鏈接
1 2 3 > >>
眼下與CSS,他們表現出垂直,居中,和靠近頁面的頂部:
1
2
3
>
>>
我可以將什麼樣的CSS應用到「網頁」類,以便按照我的意願顯示這些鏈接?
由於提前,
約翰
if ($currentpage > 1) {
echo " <div class='pages'><a href='{$_SERVER['PHP_SELF']}?currentpage=1&find={$_SESSION['find']}' class='links'><<</a></div> ";
$prevpage = $currentpage - 1;
echo " <div class='pages'><a href='{$_SERVER['PHP_SELF']}?currentpage=$prevpage&find={$_SESSION['find']}' class='links'><</a></div> ";
} // end if
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='{$_SERVER['PHP_SELF']}?currentpage=$x&find={$_SESSION['find']}' class='links'>$x</a></div> ";
} // end else
} // end if
} // end for
if ($currentpage != $totalpages) {
$nextpage = $currentpage + 1;
echo " <div class='pages'><a href='{$_SERVER['PHP_SELF']}?currentpage=$nextpage&find={$_SESSION['find']}' class='links'>></a></div> ";
echo " <div class='pages'><a href='{$_SERVER['PHP_SELF']}?currentpage=$totalpages&find={$_SESSION['find']}' class='links'>>></a></div> ";
} // end if
的CSS:
.pages
{
text-align: center;
margin-top: 10px;
margin-bottom:0px;
padding:0px;
font-family: Arial, Helvetica, sans-serif ;
}
a.links:link {
color: #000000; text-decoration: none;
text-align:center;
margin-left:8px;
margin-bottom:0px;
padding:2px;
font-family:Arial, Helvetica, sans-serif;
font-size: 16px;
}
你應該編輯這個問題。忘記PHP。只需發佈頁面的頁面部分的HTML代碼片段和CSS的相關部分(例如:訪問過的CSS不相關)。 – cletus 2009-09-18 01:51:04