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=gb2312" />
	<title>DIV垂直居中</title>
	<style type="text/css">
	<!--
	.cr { top:50%; left:50%; margin:-80px 0 0 -140px; width:280px; height:160px; position:absolute; background-color:#CCC }
	-->
	</style>
	</head>
	<body>
	<div class="cr">测试一下是不是垂直居中了;记得加上position:absolute;</div>
	</body>
	</html>
	
	
	
	 


 
						
0536-8800925