Search code examples
twitter-bootstrapnavbarsearch-box

Bootstrap search box coordinates in navbar


How can I assign coordinates to search box in navbar. I need a result like on the picture.

Picture:
enter image description here

Bootply Link


Solution

  • What do you exactly mean by giving coordinates? If you want to move the search input inside the navbar you can easily change the style of the input element to -

    position: fixed;
    right: 18%; // depends on your requirement 
    top: 3%; // depends on your requirement
    

    This code can be written along with style="width: 310px;" or by giving id to the div and writing in the stylesheet separately.

    #your_id {
        position: fixed;
        right: 18%; // depends on your requirement 
        top: 3%; // depends on your requirement  
    }
    

    and give the div/input tag this id

    <input id="your_id" class="form-control " placeholder="Поиск" style="position: fixed; right: 18%; top: 3%; width:310px" type="text">
    

    Hope this helps.