1。在PS做好的网页,切片后,在DW里做链接,预览网页时总是在左边,怎么让...
发布网友
发布时间:2024-10-03 06:25
我来回答
共3个回答
热心网友
时间:2024-11-01 08:49
我不知道你用什么排版的表格还是div+css
下面给你一种div+css排版的方式
<!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=utf-8" />
<title>无标题文档</title>
<style type="text/css">
.top{ width:100px; margin:0px auto; height:100px; background:#666;}
</style>
</head>
<body>
<div class="top">123</div>
</body>
</html>
主要作用就是 margin:0px auto;
热心网友
时间:2024-11-01 08:50
在BODY里加上MARGIN:0 auto试试,应该就能居中了。你把index改成XX首页试试。
热心网友
时间:2024-11-01 08:50
可以用这样:
<center>
<body>
</body>
</center>