开发者

CSS - vertically centering inside BUTTON element

i'm trying to create a row 开发者_开发问答with buttons, where the content inside the button is vertically aligned to the middle of the button. All buttons should should be the same height.

problem is when an image is used inside a button.

i made a small example: http://jsfiddle.net/L2L2G/

why is the the third button not aligned with the other 2 ? I think that the buttonheight should be enough for the small content?


If I use vertical-align:middle; instead of absmiddle, it works fine in Chrome.

AFAIK the latter is not a valid value for vertical-align.

Demo

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜