<html>
<head>
<title>洪恩在线 - Javascript实例</title>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<link rel="stylesheet" href="../homepage.css">
</head><body bgcolor="#FFFFFF">
<script language="Javascript" ></script>
<table width="760" border="0" cellspacing="0" cellpadding="0" align="center">
<tr>
<td align="center" valign="top"> </td>就是这句,为什么加了空格显示就完全两样呢
<td bgcolor="5F74BF" width="28" align="center"><img src="img/bule1.gif" width="28" height="49"></td>
</tr>
</table>
</body>
</html>
<head>
<title>洪恩在线 - Javascript实例</title>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<link rel="stylesheet" href="../homepage.css">
</head><body bgcolor="#FFFFFF">
<script language="Javascript" ></script>
<table width="760" border="0" cellspacing="0" cellpadding="0" align="center">
<tr>
<td align="center" valign="top"> </td>就是这句,为什么加了空格显示就完全两样呢
<td bgcolor="5F74BF" width="28" align="center"><img src="img/bule1.gif" width="28" height="49"></td>
</tr>
</table>
</body>
</html>
td如果为空就要加空格,要不格局会乱的
<div>
<p>我想可能是:红色部分的TD如果没有任何东西(ChildNodes),浏览器可能会忽略该TD,当该TD不存在,另一TD的宽度就是table的宽度了;如有ChildNodes,浏览器会为该TD自动调整宽度为760-28,即732。
不知对你有没有帮助?</p>
</div>
不知对你有没有帮助?
见:http://www.w3.org/TR/CSS2/tables.html#width-layout