网页制作方面的两道题……急!!!

来源:百度知道 编辑:UC知道 时间:2024/05/13 16:25:43
<html>
<head>
<meta http-equiv="Content-Language" content="zh-cn">
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<title>网页</title>
</head>
<body>
<div style="position: absolute; width: 268px; height: 100px; z-index: 1; left: 657px; top: 128px" id="layer1">
<center>
<table border="2" width="200" cellspacing="0" cellpadding="0" id="table1" bordercolorlight="#00FF00" bordercolordark="#00FF00">
<tr>
<td width="200" height="10" align="center"><font size="4">注意字体大小的变化</font></td>
</tr>
</table>
</center>
<p>
</div>
</body>
</html>

要求:
1、怎么通过居中设计,把这个层相对于整个网页居中呢?<

<html>
<head>
<meta http-equiv="Content-Language" content="zh-cn">
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<title>网页</title>
</head>
<body>

<div align="center" style="position: absolute;text-align:center; width: 100%; height: 100px; z-index: 1; " id="layer1">
<center>
<table border="2" width="200" cellspacing="0" cellpadding="0" id="table1" bordercolorlight="#00FF00" bordercolordark="#00FF00">
<tr>
<td width="200" height="10" align="center"><span style="FONT-SIZE: 15px;">注意字体大小的变化</span></td>
</tr>
</table>
</center>
</div>
</body>
</html>

第一个问题,再加一个tab