Bootstrap 3: Input group in navbar form takes up entire width

前端 未结 4 1441
后悔当初
后悔当初 2021-02-01 04:18

So this is what bootstrap\'s navbar form looks like.

\"\"

The default HTML is:

4条回答
  •  心在旅途
    2021-02-01 04:44

    I prefer to treat the form element as normal, and just fixed its apperance using this CSS rule:

    .navbar-form .input-group {
        display: inline-block;
        width: auto;
        vertical-align: middle;
    
        .form-control,
        .input-group-btn {
            float: left;
        }
    }
    

提交回复
热议问题