"Stylish Search Box"
Bootstrap 3.3.0 Snippet by Woramet

<link href="//maxcdn.bootstrapcdn.com/bootstrap/3.3.0/css/bootstrap.min.css" rel="stylesheet" id="bootstrap-css"> <script src="//maxcdn.bootstrapcdn.com/bootstrap/3.3.0/js/bootstrap.min.js"></script> <script src="//code.jquery.com/jquery-1.11.1.min.js"></script> <!------ Include the above in your HEAD tag ----------> <div id="custom-search-input"> <form id="custom-search-form" class="form-search form-horizontal pull-right"> <div class="input-group col-md-12"> <input type="text" class=" search-query form-control" placeholder="Search" /> <button class="btn btn-danger" type="submit"> <span class=" glyphicon glyphicon-search"></span> </button> </span> </div> </form> </div>
#custom-search-input { width: 200px; } #custom-search-input .search-query { width: 175px; padding-right: 3px; padding-right: 4px \9; padding-left: 3px; padding-left: 4px \9; text-align: center; margin-left:40px; /* IE7-8 doesn't have border-radius, so don't indent the padding */ -webkit-border-radius: 25px; -moz-border-radius: 25px; border-radius: 25px; } #custom-search-input button { border: 0; background: none; /** belows styles are working good */ padding: 2px 5px; margin-top: 2px; position: relative; margin-left:-200px; /* IE7-8 doesn't have border-radius, so don't indent the padding */ margin-bottom: 0; -webkit-border-radius: 3px; -moz-border-radius: 3px; border-radius: 3px; color:#8f8f8f; } #custom-search-input button:hover, #custom-search-input button.hover { color:#ffe400; } .search-query:focus + button { z-index: 3; }

Related: See More


Questions / Comments: