【问题标题】:Wordpress: Center aligning "Read More"Wordpress:居中对齐“阅读更多”
【发布时间】:2016-07-22 20:13:52
【问题描述】:

我创建了一个 Wordpress 二十六主题的子主题。我在对齐阅读更多文本/按钮时遇到了一些问题。在 Chrome Developer Tool 的帮助下,我发现控制链接的类称为“more-link”。在我的孩子 style.css 中,我添加了以下代码:

.more-link {
display: inline-block;
white-space: normal;
border-radius: 3em;
border: 1px solid #ff7788;
padding: 1em;
margin: 0 auto;
text-align: center;
clear: both;
}

我已经尝试了一切,但没有任何效果。

但是当我写例如:margin-left:30px; float: right 也可以。

查看图片:http://i.stack.imgur.com/9VqiL.png 见图2:http://i.stack.imgur.com/caFMy.png

【问题讨论】:

  • 尝试将以下 css 代码添加到您的子主题 css 中:.more-link { display: block !important; }
  • 它无法显示为块,因为我在它周围使用了边框。它必须是内联或内联块。我尝试使用重要的内联块没有运气。
  • 请告诉我使用我的css代码后的样子。
  • 感谢截图,现在就试试吧:.more-link { display: block !important; width: 35%; }

标签: wordpress alignment center


【解决方案1】:

尝试将以下 css 代码添加到您的子主题 style.css 文件中:

.more-link { 
display: block !important; 
width: 35%; 
}

【讨论】:

    猜你喜欢
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2015-02-04
    • 2015-07-04
    • 2012-11-01
    • 2012-03-15
    相关资源
    最近更新 更多