I am using Bootstrap to create a blog for my parents. For the navbar I am using the Bootstrap navs nav-tabs like so:
<ul class="nav nav-tabs nav-justified">
...
</ul>
<ul class="nav nav-pills nav-justified">
...
</ul>
I want to add a search bar such as you can include within navbars but I am not able to find any evidence of others trying to do so, so is it possible to add a search input to a nav-pills justified class?
This link provides some example.
You can try this code
<ul class="nav nav-tabs nav-justified"> <li><a href="#">Home</a></li> <li><a href="#">Menu 1</a></li> <li><a href="#">Menu 2</a></li> <li><input Type="text" placeholder="serach"></li> </ul>
In the end I switch over to using navbar
instead of nav-tabs
and added the links as before. Then I added the search bar using the native form
template as part of navbar
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.