想要页面居中还缺什么?
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "[url=http://www.]http://www.[/url]"><html xmlns="[url=http://www.]http://www.[/url]">
<head>
<meta http-equiv="Content-Type" c />
<title>test2</title>
<style>
html,body /*想要页面居中在这里加入aligh吗?/
{
padding:0;margin:0;
}
#container
{
width:800px;padding:0;margin:0;align:center
}
#container #head
{
width:100%;padding:0;background-color:#cc66FF
}
#container #head h
{
font-size:18px;font-family:Verdana, Arial, Helvetica, sans-serif
}
#container wrapper2
{
width:100%;padding:0
}
#container #wrapper2 #leftside
{
width:30%;padding:0;height:800px;background-color:#99FFCC;float:left;font-size:16px;font-family:"Times New Roman", Times, serif;font-weight:800
}
#container #wrapper2 #rightside
{
width:70%; padding:0; height:500px;background-color:#FFCCCC;float:left;}
#container #wrapper2 #footer
{
width:100%;padding:0;height:100px;background-color:#FFFFCC;float:left;
}
</style></head>
<body>
<div id="container">
<div id="head"><h1>head</h1></div>
<div id="wrapper2">
<div id="leftside">
<table><tbody><tr><td><img src="狂野非洲.jpg" width="200px"/><p>this is leftside.</p></td></tr></tbody></table></div>
<div id="rightside">this is rightside.this is rightside.this is rightside.this is rightside.this is rightside.this is rightside.this is rightside.this is rightside.this is rightside.this is rightside.this is rightside.this is rightside.this is rightside.</div>
</div>
<div id="footer">here goes the footer.</div>
</div>
</div>
</body>
</html>
想要页面居中,是不是在定义body的style的时候加入aligh呢?