0

我修改了一些ui-button类的高度,但文本按钮仍然在它的底部。我怎样才能将它对齐到中间?

.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没用。

http://jsfiddle.net/PM4T6/

4

3 回答 3

2

.ui-button {line-height: 20px;}

于 2013-02-25T08:14:32.193 回答
0

使用时position请务必指定top left, bottom right....

于 2013-02-25T08:14:57.247 回答
0

试试这个

.ui-button {
   display: table-cell;
   position: relative;
   padding: 0px;
   margin-right: 0.1em;
   cursor: pointer;
   text-align: center;
   overflow: visible;
   height: 50px;
}
于 2013-02-25T08:19:54.897 回答