2014-09-19 4 views
0

Я узнал, как центрировать название моей страницы, но не могу понять, как центрировать div, содержащий текст сводного описания (wrapper-summary-description).Как разместить текст тела div?

Если вы посмотрите на мой jsfiddle (http://jsfiddle.net/huskydawgs/L19g6jk6/), вы увидите текст, который говорит о Subaru Forester, в настоящее время слева. Я бы хотел, чтобы этот 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; } 

ответ

Смежные вопросы