2014-12-01 108 views
0

我試圖對齊左側標籤中的文本,但默認情況下它右對齊。爲什麼bootstrap中的@ Html.Label文本沒有對齊左側?

<div class="container"> 
      <div class="row"> 
       <div class="col-md-6"> 
        <div class="form-group"> 

         @Html.Label("7) Înregistrarea în format video a cursurilor universitare", htmlAttributes: new { @class = "control-label col-md-5 align-left" }) 


        </div> 
       </div> 
</div> 
</div> 
+0

嘗試文本對齊到左邊,你需要使用類'文本left',但使用的是'對齊,left' – 2014-12-01 23:13:18

+0

@AlvaroMontoro對準左是一個類名 – 2014-12-02 04:55:48

+0

@Justcode我明白'align-left'是一個類名。該文章的標籤爲'twitter-bootstrap',在引導中左邊對齊的類名是'text-left'(http://getbootstrap.com/css/#type-alignment)。 OP沒有在類名列表中使用:'control-label col-md-5 align-left',除非OP在CSS中定義了「align-left」(在問題中未指定),「align-left '是一個沒有意義的類名。 – 2014-12-02 05:27:26

回答

0

與此

.form-group{ 
    text-aligh: left; 
    float: left; 

    } 
+0

添加到bootsatrap.css不需要 – vasilens 2014-12-02 06:32:36

相關問題