2017-04-05 54 views
0

我有三個組,我想在一個單行顯示的字符串。 enter image description here添加網格列打破了造型

我想爲所有三個網格列添加網格,即使窗口大小減小,每個集合仍然保持不變。但添加格列與對齊和間距messign起來,它看起來像這樣:

enter image description here

我去掉填充和利潤來自兩個山坳類但仍是沒有幫助的。任何人都可以建議我需要做些什麼其他的CSS更改來修復它。請幫忙!

.no-padding { 
 
    padding: 0 !important; 
 
    margin: 0 !important; 
 
}
<div> 
 
    <div class="col-sm-4 no-padding"> 
 
    <span>in the last 24 hours</span> 
 
    </div> 
 
    <div class="col-sm-7 no-padding"> 
 
    <span>trending down </span> 
 
    <span> compared to 0 in previous 24 hours</span> 
 
    </div> 
 
</div>

+1

這是你要的行爲嗎? http://codepen.io/anon/pen/GWLVeN –

回答

1

硬盤沒有代碼的例子,但試試這個:

.text-right { 
    text-align: right; 
} 

一下添加到:

<span class="text-right">in the last 24 hours</span> 

您的跨度類添加文本對齊權將它與其他div對齊。