开发者

vertical-align: middle issues

Can anyone tell why this doesn't work? http://www.webdevout.net/test?01x afai开发者_StackOverflowk it should; my <div> elements should all be block-level so anything in #container > div should be in the middle of the #container div (with the orange outline), right?


The style vertical-align only applies to table cells, images and span tags.


use display: table on your container and then you can use vertical-align on your inner display: inline-block elements.

Working demo http://jsfiddle.net/uzcrt/

0

上一篇:

下一篇:

精彩评论

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

最新问答

问答排行榜