"Search Bar"
Bootstrap 4.1.1 Snippet by adarwash2012

<link href="//maxcdn.bootstrapcdn.com/bootstrap/4.1.1/css/bootstrap.min.css" rel="stylesheet" id="bootstrap-css"> <script src="//maxcdn.bootstrapcdn.com/bootstrap/4.1.1/js/bootstrap.min.js"></script> <script src="//cdnjs.cloudflare.com/ajax/libs/jquery/3.2.1/jquery.min.js"></script> <!------ Include the above in your HEAD tag ----------> <div class="container"> <br> <div class="center"> <div class="row"> <div class="outter_search_box"> <input class="form-control searchbar" type="text" placeholder="Search"> </div> </div> </div> </div>
.center{ justify-content: center !important; display: flex!important; } .outter_search_box{ margin-bottom: auto; margin-top: auto; height: 60px; background-color: #ffffff; border-radius: 30px; padding: 10px; border:1px solid lightgray; width:450px; box-shadow:0px 1px 3px lightgray; transition: width 0.4s linear; } .searchbar{ border:none; } .form-control:focus { outline:none; box-shadow: none; } .outter_search_box:focus-within { width:600px; transition: width 0.4s linear; border: 1px solid #ccc; }

Related: See More


Questions / Comments: