我想对齐,中间垂直<div>
文本。这是我试过的JSFiddle。但它不适合我。垂直对齐:中文字不工作
.cart_channels_main {
float: left;
height: 285px;
margin: 0 18px 15px 0;
text-align: center;
width: 100%;
vertical-align: middle;
}
.cbheading {
background: #000 none repeat scroll 0 0;
color: #c7a375;
height: 30px;
padding: 5px;
font-family: "Roboto Condensed", sans-serif !important;
vertical-align: middle;
}
<div class="col-sm-3">
<div class="cart_channels_main">
<div class="cbheading"><b>vertical align middle</b>
</div>
</div>
</div>
还有一些时间,我有2行文字,所以如果我使用保证金或行高的填充它不会为2行文字工作。就像这个例子LINK
请再次检查的问题,我刚刚更新了我的问题。它不会工作2行文本 –
是它的工作在小提琴中,但没有在我的网站工作。这里是[链接](http://test.coachfxlive.com/shop) –
是请张贴 –