Fluid input-append in Bootstrap Responsive

前端 未结 5 1576
清歌不尽
清歌不尽 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:15

    This is a pure CSS solution that works awesome, no nasty jQuery/JavaScript for layout purposes.

    http://jsfiddle.net/9Ma8V/

    The HTML

    The CSS

    input[type=text] {
       width: 100%;
    }
    .inline-button-input {
       width: 100%;
       float: right;
    }
    .inline-button-input div {
       overflow: hidden;
       padding-right: .5em;
    }
    .inline-button-input input[type=submit] {
       float: right;
    }
    

提交回复
热议问题