让图片或者文字垂直居中于层内
<!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>居中</title>
</head>
<style type="text/css">
.imageWrap{ width:200px; height:200px; text-align:center; border:#999 solid 1px; display:table-cell; vertical-align:middle; position:relative;}
.imageWrap .outer{ +position:absolute; +top:50%;+left:0}
.imageWrap .inner{ +position:relative; +top:-50%;+left:0}
.imageWrap img{ display:block; margin:0 auto}
</style>
<body>
<div class="imageWrap">
<div class="outer">
<div class="inner">
<img src="个人信息美化7.2/images/rank/1.gif"/>
<a href="#">百度</a>
</div>
</div>
</div>
</body>
</html>
Firefox和IE6.0下均正常