Danelo Danelo - 1 month ago 9
CSS Question

bootstrap snippet searchbox not working properly

So, I am using this snippet for my site: http://bootsnipp.com/snippets/featured/inline-navbar-search
But it does not seem to work as intended.As you can see in the image, when I click the search icon, the whole search box goes to left over the brand logo.
I see that the snippet was made for bootstrap 3.1.0 How can I make it to work like in the snippet for bootstrap 3.3.7 ?

enter image description here

Answer

Try with adding

text-align: right

in block like:

header .navbar-collapse form[role="search"] {
    position: absolute;
    top: 0;
    right: 0;
    width: 100%;
    padding: 0;
    margin: 0;
    color: #D04746 !important;
    z-index: 0;
    text-align: right;
}