html - How to use bootstrap to fill white spaces -


i want design div has input box , other elements. want use bootstrap give dynamic size input box change width changing window width , in mobile devices show in 2 line.

like this:

enter image description here

this example code without class:

<form> <div>     <input type="submit" value="search">     <select>         <option>value1</option>         <option>value2</option>         <option>value3</option>     </select>     text </div> <div>     <input type="text" placeholder="search text input"> </div> 

i implemented first image in post , below in code. try running it, dont forget expand snippet

<meta charset="utf-8">  <meta name="viewport" content="width=device-width, initial-scale=1">  <link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/css/bootstrap.min.css">  <script src="https://ajax.googleapis.com/ajax/libs/jquery/3.1.1/jquery.min.js"></script>  <script src="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/js/bootstrap.min.js"></script>    <form>    <div class="row">      <div class="col-sm-2">        <input type="submit" class="form-control" value="search">      </div>      <div class="col-sm-3">        <select class="form-control">          <option>value1</option>          <option>value2</option>          <option>value3</option>        </select>      </div>      <div class="col-sm-2">        text</div>        <div class="col-sm-2">        <input type="text" class="form-control" placeholder="search text input">      </div>    </div>


Comments

Popular posts from this blog

asp.net - How to correctly use QUERY_STRING in ISAPI rewrite? -

jsf - "PropertyNotWritableException: Illegal Syntax for Set Operation" error when setting value in bean -

laravel - Undefined property: Illuminate\Pagination\LengthAwarePaginator::$id (View: F:\project\resources\views\admin\carousels\index.blade.php) -