[英]how to vertical align jQuery button text?
I've modifyed a bit the height of ui-button
class but the text button remains at the bottom of it. 我修改了一下ui-button
类的高度,但文本按钮仍然在它的底部。 How can I align it to the middle? 我怎样才能将它与中间对齐?
.ui-button {
display: inline-block;
position: relative;
padding: 0px;
margin-right: 0.1em;
cursor: pointer;
text-align: center;
overflow: visible;
// resize a bit the height
height: 20px;
}
vertical-align
didn't work. vertical-align
不起作用。
.ui-button {line-height:20px;}
当使用position
一定要指定top
left
, bottom
right
....
try this 尝试这个
.ui-button {
display: table-cell;
position: relative;
padding: 0px;
margin-right: 0.1em;
cursor: pointer;
text-align: center;
overflow: visible;
height: 50px;
}
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.