Wordpress二十九主题删除主题中所有不必要的间距

时间:2016-11-02 06:55:57

标签: css wordpress

基本上这是一个问题,但可能需要多部分答案来消除多余的间距。基本上,在默认的二十九主题主题上的帖子上设置精选图像时会出现问题。我有一个实时测试环境设置,可在此处显示:http://192.241.239.174/index.php/2016/11/02/hello-world/

以下是我目前对它的看法:http://prntscr.com/d204p5

感谢您的帮助

编辑:进一步研究类似的问题我通过使用一些自定义css将缩略图/特色图像最大宽度更改为150稍微接近,这应该没问题,因为我的所有特色图像反正将是150x150。此代码已添加到自定义css中:

.post-thumbnail img {
    float: left;
    margin: 5px 15px 10px 0;
    max-width: 150px;
}

现在文本看起来确实略高,但仍无法包装缩略图,但仍然不够接近缩略图。我希望文本更接近缩略图

编辑:完整的解决方案 我使用的完整解决方案是将此代码添加到我的自定义css中:

.entry-footer {
    display: none;
}

.post-thumbnail img {
    float: left;
    margin: 0px 20px 0px 0;
    max-width: 150px;
}

body:not(.search-results) article:not(.type-page) .entry-content {
     float: none !important; 
     width: 100%;
}


.entry-content > :last-child {
    margin-bottom: 0;
    text-align: center;
    width:100%;
}

1 个答案:

答案 0 :(得分:1)

我认为这不是更好的选择,事实上我会设置一个儿童主题并顺便开展工作:

.entry-footer {
    display: none;
}

.post-thumbnail img {
    float: left;
    margin: 0px 20px 0px 0;
    max-width: 150px;
}

body:not(.search-results) article:not(.type-page) .entry-content {
     float: none !important; 
     width: 100% !important;
}

.entry-content > :last-child {
    margin-bottom: 0;
    text-align: center;
}

如果某些内容不起作用,您可能需要添加!important关键字。 结果:Is that like what you wanted?

相关问题