求教如何设置让#box1居中显示啊
<!DOCTYPE html>
<html>
<head>
<title>hello world</title>
<style type="text/css">
h1{color:red;
font-size:18px}
div{
border:2px dotted red;
}
#box1{
width: 300px;
height: 300px;
background: #245;
position:relative;
}
#box2{
position:absolute;
top:20px;
right: 18px;
}
#box3{
position: absolute;
bottom: 10px;
left:18px;
}
</style>
</head>
<body>
<div id="box1">
<div id="box2">居中的标题</div>
<div id="box3">正文</div>
</div>
<h1>hello world</h1>
</body>
</html>