以下代码 只有最上边两行不同,其它都一样,但是 显示效果却不一样。我想用第一段代码来实现第二段的效果,怎么办?
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312" />
<title>PHP 简易留言簿</title>
<style type="text/css">
<!--
body {
font-family : verdana, tahoma;
font-size:12px;
margin:0px;
}
table {
border-collapse:collapse;
}
table caption {
font-size:18px;
text-align:center;
margin:3px 0px 7px 0px;
height:40px;
}
table tr th,table tr td {
border:#48BF99 1px solid;
padding:3px 2px 2px 3px;
}
form {
margin:0px;
}
Input.text {
width:152px;
height:21px;
border:#D5D5D5 1px solid;
}
Input.button {
width: 69px;
height: 24px;
background-image:url(Images/msgbox_icon.gif);
background-position:0px -160px;
background-repeat:no-repeat;
background-color:transparent;
border:0px;
padding:2px 0px 0px 0px;
cursor:hand!important;
cursor:pointer;
color:#333;
}
table.page {
border-collapse:collapse;
width:760px;
margin-top:15px;
}
table.page tr td {
border:0px;
padding:0px;
height:20px;
}
table.page tr td UL{
margin:0px;
padding:0px;
height:20px;
}
table.page tr td UL LI {
float:left;
width:30px;
margin:0px 2px;
height:20px;
text-align:center;
list-style:none;
padding:0px;
}
table.page tr td UL LI.button {
width:60px;
margin:0px 2px;
height:20px;
text-align:center;
cursor:hand!important;
cursor:pointer;
}
table.page tr td UL LI.button2 {
width:60px;
margin:0px 2px;
height:20px;
text-align:center;
}
table.page tr td UL LI.button2 div{
float:none;
line-height:20px;
height:20px;
width:100%;
color:#D6D6D6;
text-decoration:none;
border:#48BF99 1px solid;
background-color:#FFFFCC;
}
table.page tr td UL LI A {
float:none;
line-height:20px;
height:20px;
width:100%;
color:#000000;
text-decoration:none;
border:#48BF99 1px solid;
background-color:#FFFFCC;
}
-->
</style>
</head><body>
<table border="0" align="center" cellpadding="0" cellspacing="0" class="page">
<tr>
<td><ul><li class="button2"><div>首页</div></li> <li class="button2"><div>上一页</div></li><li><a href="?page=1">1</a></li><li><a href="?page=2">2</a></li><li><a href="?page=3">3</a></li><li><a href="?page=4">4</a></li><li><a href="?page=5">5</a></li><li><a href="?page=6">6</a></li><li><a href="?page=7">7</a></li><li><a href="?page=8">8</a></li><li><a href="?page=9">9</a></li><li><a href="?page=10">10</a></li><li class="button"><a href="?page=2">下一页</a></li> <li class="button"><a href="?page=10">末页</a></li></ul></td>
</tr>
</table>
</body>
</html>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312" />
<title>PHP 简易留言簿</title>
<style type="text/css">
<!--
body {
font-family : verdana, tahoma;
font-size:12px;
margin:0px;
}
table {
border-collapse:collapse;
}
table caption {
font-size:18px;
text-align:center;
margin:3px 0px 7px 0px;
height:40px;
}
table tr th,table tr td {
border:#48BF99 1px solid;
padding:3px 2px 2px 3px;
}
form {
margin:0px;
}
Input.text {
width:152px;
height:21px;
border:#D5D5D5 1px solid;
}
Input.button {
width: 69px;
height: 24px;
background-image:url(Images/msgbox_icon.gif);
background-position:0px -160px;
background-repeat:no-repeat;
background-color:transparent;
border:0px;
padding:2px 0px 0px 0px;
cursor:hand!important;
cursor:pointer;
color:#333;
}
table.page {
border-collapse:collapse;
width:760px;
margin-top:15px;
}
table.page tr td {
border:0px;
padding:0px;
height:20px;
}
table.page tr td UL{
margin:0px;
padding:0px;
height:20px;
}
table.page tr td UL LI {
float:left;
width:30px;
margin:0px 2px;
height:20px;
text-align:center;
list-style:none;
padding:0px;
}
table.page tr td UL LI.button {
width:60px;
margin:0px 2px;
height:20px;
text-align:center;
cursor:hand!important;
cursor:pointer;
}
table.page tr td UL LI.button2 {
width:60px;
margin:0px 2px;
height:20px;
text-align:center;
}
table.page tr td UL LI.button2 div{
float:none;
line-height:20px;
height:20px;
width:100%;
color:#D6D6D6;
text-decoration:none;
border:#48BF99 1px solid;
background-color:#FFFFCC;
}
table.page tr td UL LI A {
float:none;
line-height:20px;
height:20px;
width:100%;
color:#000000;
text-decoration:none;
border:#48BF99 1px solid;
background-color:#FFFFCC;
}
-->
</style>
</head><body>
<table border="0" align="center" cellpadding="0" cellspacing="0" class="page">
<tr>
<td><ul><li class="button2"><div>首页</div></li> <li class="button2"><div>上一页</div></li><li><a href="?page=1">1</a></li><li><a href="?page=2">2</a></li><li><a href="?page=3">3</a></li><li><a href="?page=4">4</a></li><li><a href="?page=5">5</a></li><li><a href="?page=6">6</a></li><li><a href="?page=7">7</a></li><li><a href="?page=8">8</a></li><li><a href="?page=9">9</a></li><li><a href="?page=10">10</a></li><li class="button"><a href="?page=2">下一页</a></li> <li class="button"><a href="?page=10">末页</a></li></ul></td>
</tr>
</table>
</body>
</html>