多跨度的文本

时间:2013-08-05 15:09:32

标签: html css

我想像我的示例http://jsfiddle.net/xKSUH/一样对齐我的文字。我的问题是我的文本没有居中,第二行有一个空格......

我的HTML

    <div class="row"> 
<div class="span12"> 


    Hello <span data-bind="text: viewModel.firstName()"></span>,
    We have analyzed <span data-bind="text: viewModel.user.nbAnalyzedMails()"></span>
    emails, extracted <span data-bind="text: viewModel.user.newMessages()"></span>
    new messages, please check report in your dashboard ></span> <br>



</div>  
</div>

CSS

.row {text-align: center}

1 个答案:

答案 0 :(得分:1)

检查这个

CSS

.row {text-align: center}
.row .span12 p{
    display: inline-block;
    margin: 0px;
}

HTML

<div class="row"> 
    <div class="span12"> 
        <p>Hello <span data-bind="text: viewModel.firstName()"></span>,</p>
        <p>We have analyzed <span data-bind="text: viewModel.user.nbAnalyzedMails()"></span></p>
        <p>emails, extracted <span data-bind="text: viewModel.user.newMessages()"></span></p>
        <p>new messages, please check report in your dashboard.</p>
    </div>  
</div>