Text input rendering issue with Twitter Bootstrap

后端 未结 8 1500
天命终不由人
天命终不由人 2020-12-15 04:18

I\'m trying to use Twitter\'s bootstrap for a quick few pages. I\'m having problems getting text fields to render like they do at http://twitter.github.com/bootstrap/

8条回答
  •  南笙
    南笙 (楼主)
    2020-12-15 05:07

    In my case:
    - I had the input text in a form
    - It did work in Firefox and did not work in Chrome

    I fixed this by overriding the line-height in the bootstrap css. First it was like this:

    line-height: inherit;
    

    and when I changed it in my css(so it overrides the bootstrap css):

    line-height: normal;
    

    It worked!


    For people who see this and don't know what I'm talking about, press f12 and go to your textbox.
    Now in the styles tab u will see:

    input, button, select, textarea {
       font-family: inherit;
       font-size: inherit;
       font-height: inherit;
    }
    

    that is the one that you want to override.

提交回复
热议问题