0
我發現如何居中我的頁面標題,但無法弄清楚如何居中包含摘要描述文本(wrapper-summary-description)的div。如何將正文文本div居中?
如果你看看我的jsfiddle(http://jsfiddle.net/huskydawgs/L19g6jk6/),你會看到有關斯巴魯森林人的文字,目前在左邊。我希望這個div被集中。
我該怎麼做?
這裏是我的jsfiddle:http://jsfiddle.net/huskydawgs/L19g6jk6/
這裏是我的代碼:
<div class="products-intro-1st rtecenter">
<h2 class="section-title blue">
<span class="section-title-bold">Subaru</span> Forester</h2>
</div>
<div class="wrapper-summary-description rtecenter">
<p class="summary-description">
The Subaru Forester is a compact crossover manufactured since 1997 by Fuji Heavy Industries and sold under the Subaru brand. Available in Japan from 1997, the Forester shares its platform with the Impreza. It was introduced in 1997 as a compact crossover wagon. It has been crowned Motor Trend's 2014 SUV of the Year and The Car Connection's Best Car To Buy 2014
</p>
</div>
這裏是我的CSS:
.products-intro-1st {
margin: 50px 0 0 0;
}
h2.section-title {
font-family: SegoeRegular, Helvetica, Arial;
font-size:32px;
font-weight: normal;
margin: 10px 0 50px 0;
border-bottom: 1px dotted #f66511;
padding:0 0 5px 0;
}
h2.section-title-bold {
font-weight: bold;
}
.wrapper-summary-description {
position:relative;
width:540px;
border: none;
margin: 40px 0 0 0;
overflow: hidden;
}
.summary-description {
color: #232323;
font-family: Helvetica, Arial, sans-serif;
font-size: 14px;
line-height: 25px;
margin: 0;
text-align: left;
}
.rtecenter {
text-align:center
}
.blue { color: #2251a4; }