content logo

Bootstrap Search Boxes:

Navigation Bar with Bootstrap Search Box

If you want a successful website with thousands of visitors each day, you have to make sure they like it. one of the greatest ways to ensure people like spending time in your website is by improving its look and style. An aesthetically beautiful website, lures in and attracts visitors and readies them to be hit with the content inside the site. Many websites offer great content but not a well enough appearance; therefore, they fail to attract people’s attention and their content is wasted. On the other hand, when your website looks great, it automatically attracts visitors every day and that means potential long-time members for the future of your website. Besides the styles and effects that you use in your site, managing the physical space in your pages and making sure you never run out of it is also important and has a big impact.

To avoid cluttering your pages, we suggest you use the code below to add this full-size search box in your navbar. This is the same as a navbar and takes up the same space as your navigation bar at the top of your screen. Clicking the toggle button will expand this bootstrap search box and allows you to use it. it is a simple search box capable of improving your website by a lot. Simple search boxes with Bootstrap are popular because of the great impacts they have on your website.

#

Full Size Search Box

#

Bootstrap Search Box

#

Simple Search Box

#

Search Box with Bootstrap

<!-- This script got from frontendfreecode.com -->
<div class="navbar navbar-inverse navbar-fixed-top">
    <div class="container">
        <div class="navbar-header">
            <button type="button" class="navbar-toggle" data-toggle="collapse" data-target=".navbar-collapse">
                <span class="icon-bar"></span>
                <span class="icon-bar"></span>
                <span class="icon-bar"></span>
            </button>
            <a class="navbar-brand" href="#">My Project</a>
        </div>
        <div class="navbar-collapse collapse" id="searchbar">
            <ul class="nav navbar-nav navbar-right">
                <li><a href="#">About</a></li>
                <li id="userPage">
                    <a href="#"><i class="icon-user"></i> My Page</a>
                </li>
                <li><a href="#logout" data-prevent="">Logout</a></li>
            </ul>
            <ul class="nav navbar-nav navbar-right">
                <li><a href="#">Contact</a></li>
            </ul>
            <form class="navbar-form">
                <div class="form-group" style="display: inline;">
                    <div class="input-group" style="display: table;">
                        <span class="input-group-addon" style="width: 1%;"><span class="glyphicon glyphicon-search"></span></span>
                        <input class="form-control" name="search" placeholder="Search Here" autocomplete="off" autofocus="autofocus" type="text" />
                    </div>
                </div>
            </form>
        </div>
        <!--/.nav-collapse -->
    </div>
</div><a style="font-size: 8pt; text-decoration: none" target="_blank" href="http://frontendfreecode.com">Free Frontend</a>
                                                                            
<link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.0/css/bootstrap.min.css">
<script src="https://code.jquery.com/jquery-1.11.1.min.js"></script>
<script src="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.0/js/bootstrap.min.js"></script>
<!DOCTYPE html>
<html>
<head>
<meta charset="UTF-8">
<!-- This script got from frontendfreecode.com -->

<link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.0/css/bootstrap.min.css">
<script src="https://code.jquery.com/jquery-1.11.1.min.js"></script>
<script src="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.0/js/bootstrap.min.js"></script>
</head>
<body>
<div class="navbar navbar-inverse navbar-fixed-top">
    <div class="container">
        <div class="navbar-header">
            <button type="button" class="navbar-toggle" data-toggle="collapse" data-target=".navbar-collapse">
                <span class="icon-bar"></span>
                <span class="icon-bar"></span>
                <span class="icon-bar"></span>
            </button>
            <a class="navbar-brand" href="#">My Project</a>
        </div>
        <div class="navbar-collapse collapse" id="searchbar">
            <ul class="nav navbar-nav navbar-right">
                <li><a href="#">About</a></li>
                <li id="userPage">
                    <a href="#"><i class="icon-user"></i> My Page</a>
                </li>
                <li><a href="#logout" data-prevent="">Logout</a></li>
            </ul>
            <ul class="nav navbar-nav navbar-right">
                <li><a href="#">Contact</a></li>
            </ul>
            <form class="navbar-form">
                <div class="form-group" style="display: inline;">
                    <div class="input-group" style="display: table;">
                        <span class="input-group-addon" style="width: 1%;"><span class="glyphicon glyphicon-search"></span></span>
                        <input class="form-control" name="search" placeholder="Search Here" autocomplete="off" autofocus="autofocus" type="text" />
                    </div>
                </div>
            </form>
        </div>
        <!--/.nav-collapse -->
    </div>
</div><div id="bcl"><a style="font-size:8pt;text-decoration:none;" href="http://www.devanswer.com">Free Frontend</a></div>

</body>
</html>
Preview