input padding cutting out text in firefox

前端 未结 2 507
孤街浪徒
孤街浪徒 2021-01-01 16:54

In firefox when I use a bootstrap form-control input element, if I pad the input element it cuts out the text by padding inwards rather than around the text. It only seems t

相关标签:
2条回答
  • 2021-01-01 17:41

    The Bootstrap form-control class gets a fixed height by default. Just add a height: auto; to your .join-form selector(to keep flexibility), and change the padding to get the original effect, like this padding: 14px 20px;

    See here: http://jsfiddle.net/x78Bh/

    0 讨论(0)
  • 2021-01-01 17:42

    Add height property then apply the padding like below. Now you can see both firefox and chrome will behave same.

    .join-form {
    padding: 20px; /*comment this out to see effect of padding */
    margin: 12px 0px;
    font-size: 16px;
    letter-spacing: 0px;
    font-weight: 300;
    height:60px;
    }
    

    DEMO

    0 讨论(0)
提交回复
热议问题