网页中表格居中的问题

来源:百度知道 编辑:UC知道 时间:2024/05/10 08:14:04
我是新手.
我做flash想放入表格,就是不居中,好象还不在表格里

代码入下:<html>
<head>
<title>888999</title>
</head>
<body bgcolor="9B9B9B" TEXT="White" LINK="Silver"

VLINK="Silver">
<table cellSpacing=0 cellPadding=0 width=780

align="center" border=0>
<capyion align="center"><img src="hy .bmp"></caption>
<tr align="center"><td valign=top>
<embed src="tiao.swf"; align="top" width="800" height="600"
quality="high" wmode="transparent" align="center"
style="position: absolute; left:0; top:0"></td>
</tr>
</table>
</body>
</html>

实现代码如下:

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"><!--加这句就可以height="100%"-->
<html >
<head>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312" />
<title>height="100%"</title>
</head>

<body >
<table width="100%" height="100%" border="0" cellpadding="0" cellspacing="0" bgcolor="#FFFF00">
<!--DWLayoutTable-->
<tr>
<td> </td>
</tr>
</table>
</body>
</html>

注意:关键就是:
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">

<capyion>是不能放在
<table>
与<tr>之间的,
要么放在外面,要么放在单元格里!<td>
还有<embed>不要设置什么 style="position:absolute;left:0px;top:0px;"
你就是再怎么设置也