html - Multiple buttons in input group -


i'm trying implement input group has multiple buttons on left , 1 button on right shown in image:

enter image description here

the problem is, have more 1 button per side, input field resizes max width , kicks 1 button out on smaller displays:

enter image description here

with button on left , button on right, works 100% on screen sizes:

enter image description here

le code:

    <div class="input-group br">         <span class="input-group-btn">             <div class="btn-group">                 <a href="#" class="btn btn-primary clear-search">                     <span class="glyphicon glyphicon-refresh"></span>                 </a>                 <a href="#" class="btn btn-primary qr-code">                     <span class="glyphicon glyphicon-qrcode"></span>                 </a>             </div>         </span>         <input class="form-control search" type="search" name="search" placeholder="search">         <span class="input-group-btn">             <div class="btn-group dropup">                 <button class="btn btn-primary dropdown-toggle" type="button" data-toggle="dropdown" aria-haspopup="true" aria-expanded="false">                     <span class="glyphicon glyphicon-search"></span>                     search                     <span class="caret"></span>                 </button>                 <ul class="dropdown-menu dropdown-menu-right">                     <li><a class="buyer-identifier" href="#">buyer number</a></li>                     ...                     <li class="divider"></li>                     <li><a class="clear-search" href="#">clear search</a></li>                 </ul>             </div>         </span>     </div> 

fiddle demo

any idea on how make first image work screen sizes?

you don't need btn-group element...

    <div class="input-group br">         <span class="input-group-btn">             <a href="#" class="btn btn-primary clear-search">               <span class="glyphicon glyphicon-refresh"></span>           </a>           <a href="#" class="btn btn-primary qr-code">             <span class="glyphicon glyphicon-qrcode"></span>           </a>         </span>         <input class="form-control search" type="search" name="search" placeholder="search">         <span class="input-group-btn">             <div class="btn-group dropup">                 <button class="btn btn-primary dropdown-toggle" type="button" data-toggle="dropdown" aria-haspopup="true" aria-expanded="false">                     <span class="glyphicon glyphicon-search"></span>                     search                     <span class="caret"></span>                 </button>                 <ul class="dropdown-menu dropdown-menu-right">                     <li><a class="buyer-identifier" href="#">buyer number</a></li>                     ...                     <li class="divider"></li>                     <li><a class="clear-search" href="#">clear search</a></li>                 </ul>             </div>         </span>     </div> 

bootply example


Comments

Popular posts from this blog

python - Healpy: From Data to Healpix map -

c - Bitwise operation with (signed) enum value -

xslt - Unnest parent nodes by child node -