'vertical-align:middle'不起作用 [英] 'vertical-align: middle' does not work

查看:101
本文介绍了'vertical-align:middle'不起作用的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

http://codepen.io/abdulahhamzic/pen/rLBoOj

我试图让段落(流的名称和其他信息)在其父母的中间垂直对齐。

I'm trying to get the paragraphs (the name and other info of the stream) to be vertically aligned in the middle of their div parents. I'm trying this CSS code and it is not working:

.col-sm-4{
  text-align: right;
  vertical-align: middle;
}    


推荐答案

您的图标总是73px ?如果是这样,你可以使用它来扩展你的名字/其他信息的高度。

Will your icon always be 73px? If so you could use that to extend the height of your name/other info.

http://codepen.io/anon/pen/pbJVvG

.col-sm-4 p {
  line-height: 73px;
}

这篇关于'vertical-align:middle'不起作用的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆