开发者

Google Chrome Placeholder Alignment Problem

In开发者_如何学Python Google Chrome when using placeholder in an text input with the height of 30px, the place holder text it vertical aligned top??

How can I make it sit in the vertical middle of the text input?


Alignment of placeholder text is broken in the current version of Chrome, because it’s broken in the current WebKit. Unfortunately, you won’t be able to do this using native placeholders, until it’s fixed.

  • Chromium bug 72413
  • WebKit bug 54797

Update: According to the Chromium bug, the fix should ship in Chrome 14.


In the meantime, you can use padding-top to push the text down.

0

上一篇:

下一篇:

精彩评论

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

最新问答

问答排行榜