這讓我開心,因爲我記得前些日子有用。單個帖子頁面中心'the_post_thumbnail'Wordpress
我無法將圖像居中放在單個帖子頁面上。試過不同的類,甚至實現了bootstrap,這對於這樣一個簡單的頁面來說不應該是需要的。它在帖子頁面存檔和主頁上的最新帖子完美運行。
我錯過了什麼?它在SASS中風格化,不應該與CSS發生衝突。
在此先感謝!
#singlepost{
.blog-image {
margin: 0 auto;
}
h1 {
color: #fff;
@include PTSansNarrowRegular;
font-size: 50px;
color: black;
line-height: 45px;
letter-spacing: -1.5px;
max-width: 900px;
margin: 0 auto 27px auto;
/*text-align: center;
padding: 20px;*/
}
p {
padding-left: 60px;
padding-right: 60px;
text-align: justify;
padding-bottom: 30px;
}
}
<? get_header(); ?>
<section id="singlepost">
<div class="container">
<div class="row">
<div class="col-sm-12"><h1><? the_title(); ?></h1></div>
<div class="col-sm-12 image-responsive blog-image">
<? the_post_thumbnail('full'); ?>
</div>
<div class="col-sm-12">
<p><? the_content(); ?></p>
</div>
</div>
</div>
</section>
<? get_footer(); ?>
是這樣的? https://codepen.io/anon/pen/xdYmqr –
謝謝Michael!是的,「文字中心」標籤做到了。其中一個我失去了它,哈哈。再次感謝! – Rick
沒問題。我會提交作爲答案,因爲你現在有其他答案。 –