<div class="pagediv">//外围已知宽度节点
<ul>
<li><span class="prev"> </span></li>
<li><span>1</span></li>
<li><a href="#">2</a></li>
<li><a href="#">3</a></li>
<li><a href="#">4</a></li>
<li><a href="#">5</a></li>
<li><a class="next" href="#"> </a></li>
</ul>
</div>
<style type="text/css">
.pagediv{ width:500px; text-align:center; padding:13px 0; float:left;}
.pagediv ul{margin:0 auto; }
.pagediv li {display:inline;}
.pagediv span, .pagediv a { display:inline-block;margin:0 auto; width:23px; height:20px; border:1px solid #696969;margin-bottom:7px;line-height:20px; text-align:center;}
.pagediv span {color:#fff; background:#E70012;}
.pagediv span.prev, .pagediv a.prev { width:26px; height:20px; border:1px solid #696969; background:url(../images/prev_bg.jpg) no-repeat 0 0;}
.pagediv span.next, .pagediv a.next { width:26px; height:20px; border:1px solid #696969; background:url(../images/next_bg.jpg) no-repeat 0 0;}
</style>
注:1、外围节点pagediv设置text-align:center;
2、分页码写在ul及li内,两者都未设宽度,ul为margin:0 auto; li的display为inline
3、分页内部的span及a标签,给定宽度,文本居中显示,display为inline-block(即将对象呈递为内联对象,但是对象的内容作为块对象呈递。旁边的内联对象会被呈递在同一行内,允许空格。)