2014-09-05 69 views
2

我該如何對標題「BOASISH正在建設中」進行集中,但保留由Kyle Boas·2014年9月4日關注:Twitter,Google+ 原樣。我的網站是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

你的CSS

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

或者只是添加此代碼,您可以添加以下代碼

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

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

enter image description here

+0

好吧,工作,我如何縮小標題下面的灰線,所以它擁抱B和N的BOASISH IS正在建設? – 2014-09-05 20:12:47

1

更改

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

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

1

你可以在你的style屬性添加text-align: centerwidth: 100%

<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>