div wordpress中的文本中心ul分页

时间:2015-07-08 07:57:03

标签: css wordpress pagination

我一直试图将包含ul分页的内容集中在一起。 margin-left和margin0right仅以div为中心,但text-align:center不会将内容置于中心内。

以下是代码:

CSS

/* Pagenation */
.article .pagelinks { text-align: center !important; display: table; margin-left: auto; margin-right: auto; width: 240px; position: relative; overflow: hidden; padding: 0; clear: both; }
.article .pagelinks ul { list-style:none; text-align: center; margin: auto; padding: 0; }
.article .page-numbers li {display:inline;}
.article .page-numbers li a {display:block; float:left; padding:4px 9px; margin-right:7px; color: #911d23;}
.article .page-numbers li span.current {display:block; float:left; padding:4px 9px; margin-right:7px; background-color: #fff; color: #911d23;}

以下是相关网页的链接:http://disa.com.sv/constructora/?page_id=10&paged=2

如何将文本对齐居中或居中?

1 个答案:

答案 0 :(得分:0)

试试这个:

.article .page-numbers li{display:inline-block}