藍森林首頁 | 返回主頁 | 本站地圖 | 站內搜索 | 聯繫信箱 |
 您目前的位置:首頁 > 自由軟件 > 技術交流 > 應用編程


    

藍森林 http://www.lslnet.com 2006年8月25日 8:28

求教:關於嵌套表格時字體自動加粗的問題

情況描述:因為我在製作網頁時需要使用到嵌套表格,在我尚未嵌套之前,表格裡的文字是正常的,但是當我在表格中又嵌入一個表格時,再加入文字,文字就自動變成 粗體了,圖片及源代碼如下,請各位朋友指教:
嵌套前:
[img]http://www.footo.cn/albums0502/34155/40609/01.JPG[/img]
嵌套後:
[img]http://www.footo.cn/albums0502/34155/40609/02.JPG[/img]
—————————————————————————————
嵌套前源代碼:
<!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>Hello World</title>
<style type="text/css">
<!--
body,td,th {font-size: 12px;color: #333333;}
body {background-color: #DEDBD6;margin-top: 0px;margin-bottom: 0px;}
a {font-size: 12px;color: #990000;}
a:link {text-decoration: none;}
a:visited {text-decoration: none;color: #990000;}
a:hover {text-decoration: underline;color: #FF0000;}
a:active {text-decoration: none;color: #990000;}
-->
</style></head>
<body>
<table width="780" align="center" cellspacing="4" bgcolor="#FFFFFF"><tr>
<td bgcolor="#F7F3DE"><div align="center">Hello World</div></td>
</tr>
<tr>
<td bgcolor="#F7F3DE"><div align="center">Hello World</div></td>
</tr>
<tr>
<td bgcolor="#F7F3DE"><div align="center">Hello World</div></td>
</tr>
</table>
</body>
</html>
嵌套後源代碼:
<!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>Hello World</title>
<style type="text/css">
<!--
body,td,th {font-size: 12px;color: #333333;}
body {background-color: #DEDBD6;margin-top: 0px;margin-bottom: 0px;}
a {font-size: 12px;color: #990000;}
a:link {text-decoration: none;}
a:visited {text-decoration: none;color: #990000;}
a:hover {text-decoration: underline;color: #FF0000;}
a:active {text-decoration: none;color: #990000;}
-->
</style></head>
<body>
<table width="780" align="center" cellspacing="4" bgcolor="#FFFFFF"><tr>
<td bgcolor="#F7F3DE"><table width="100%"  border="0" cellspacing="0" cellpadding="0">
<tr>
<th scope="col">Hello World</th>
</tr>
<tr>
<th scope="col">Hello World</th>
</tr>
<tr>
<th scope="col">Hello World</th>
</tr>
</table></td>
</tr>
</table>
</body>
</html>

表頭會加粗的

<th scope="col">Hello World</th>

改成
<td align=center>Hello World</td>

錯發兩貼.
      請斑竹幫忙刪除此貼
            請勿回復.
                   謝謝.

試了,果然如此,多謝指教。。。




Copyright © 1999-2000 LSLNET.COM. All rights reserved. 藍森林網站 版權所有。 E-mail : webmaster@lslnet.com