text-align: center; not working for Inputfields Bootstrap

时间:2016-03-02 10:56:31

标签: html css twitter-bootstrap text-align

I've got the following code that will allow the user to type the text from center. But when I edit the textbox with some text, the cursor moves to the right end for every character pressed. I'm using bootstrap 2.x, how do I fix it?

<input type="text" class="input-xxlarge" style="text-align: center;">

JSFiddle Link

1 个答案:

答案 0 :(得分:0)

您可以删除内联样式并改为使用文本中心类:

git pull