如何将帖子标题集中在一起?

时间:2014-09-05 20:04:18

标签: html css genesis

我如何将标题集中在“BOASISH正在建设中”,但保留Kyle Boas·关注:Twitter,Google+ 2014年9月4日。我的网站是http://boasish.com,如果您收到错误页面,请使用http://orangina.asmallorange.com/~boasishc/作为网址,而不是http://boasish.com

<h2 class="entry-title" itemprop="headline"><a href="http://orangina.asmallorange.com/~boasishc/site-under-construction/" rel="bookmark">Boasish is Under Construction</a></h2>
    <a href="http://orangina.asmallorange.com/~boasishc/site-under-construction/" rel="bookmark">Boasish is Under Construction</a>
</h2>

3 个答案:

答案 0 :(得分:3)

您可以将此代码添加到css

.entry-header h2{
   text-align: center;
   width: 100%;
}

或只是添加此代码

.entry-header{
   text-align: center;
}

header .entry-meta{
   text-align: left;
}

enter image description here

答案 1 :(得分:1)

更改

<h2 class="entry-title" itemprop="headline">

<h2 class="entry-title" itemprop="headline" style="text-align: center;">

答案 2 :(得分:1)

您可以在text-align: center属性中添加width: 100%style

<h2 class="entry-title" style="text-align: center; width: 100%;" itemprop="headline"><a href="http://orangina.asmallorange.com/~boasishc/site-under-construction/" rel="bookmark">Boasish is Under Construction</a></h2>
    <a href="http://orangina.asmallorange.com/~boasishc/site-under-construction/" rel="bookmark">Boasish is Under Construction</a>
</h2>