Fluid input-append in Bootstrap Responsive

前端 未结 5 1584
清歌不尽
清歌不尽 2020-12-03 03:25

I\'ve been struggling to get an input with an input-append element to have the correct width in a fluid layout. I\'m using v2.0.4 of Bootstrap. As I resize to make the page

5条回答
  •  死守一世寂寞
    2020-12-03 04:28

    Since your input is a .span10, the button should be a .span2.

    But the behavior of the button radically changes. You can fix it with this css :

    .input-append .btn {
        float: none!important;
        margin-left: 0!important;
    }
    

    And to be even more precise, the button should be as large as a .span2 plus the fluidGridGutterWidth. Which is width: 17.02127659% according to the default values.

提交回复
热议问题