如何让网页上下居中显示?
这个问题吗
还是不难的,关键是要用表格。要用两个表格,外面的表格的宽和高都设成100%。一行一列,并且再属性里面设定,左右和上下都居中。然后再向其中插入你的表格。把下面的代码考下来,你看看是不是这个效果呢。
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4。 01 Transitional//EN">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<title></title>
</head>
<body>
<table width="100%" height="100%" border="0" cellpadding="0" cellspacing="0">
<tr>
<td align="center"><table width="778" height="300" border="0" cellpadding="0" cellspacing="0" bgcolor="#FF0000">
<tr>
<td align="center">是这个效果吗?</td>
</tr>
</table></td>
</tr>
</table>
</body>
</html>。
。