本页主题: CSS 与文档类型 的 问题 打印 | 加为IE收藏 | 复制链接 | 收藏主题 | 上一主题 | 下一主题

我是学生
今宵没的睡
级别: 江湖大侠


精华: 3
发帖: 762
威望: 571 点
财富: 40 K币
贡献值: 0 点
注册时间:2005-11-25
最后登录:2008-11-12

 CSS 与文档类型 的 问题

以下代码 只有最上边两行不同,其它都一样,但是 显示效果却不一样。我想用第一段代码来实现第二段的效果,怎么办?


Copy code
<!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>


Copy code
<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>

这个世界上只有两件事是最公平的:
1.每个人每天都只有24小时;
2.每个人都必须面对死亡.
-------------------------------------------------------------
本人长期受理动态ASP网页制作与修改,留言簿、论坛制作等业务。
我的邮箱 我的主页
顶端 Posted: 2008-09-04 11:57 | [楼 主]
帖子浏览记录 版块浏览记录
IECN社区 » XHTML/CSS/Dreamweaver

Time now is:12-03 14:46, Gzip disabled 京ICP备06069722号
Powered by PHPWind v6.3.2 Certificate Code © 2003-08 PHPWind.com Corporation