Skip to content

navigation bar is misplaced when the window gets smaller

Solved Customisation
23 3 7.1k 1
  • I have the same things for the navbar when I have a lot of icons on the left.

    the solution I found is to move the icons of the navbar to the left to have more room when you click on the search button and no longer have this rather annoying phenomenon

    /*left*/
    @media (min-width: 768px) {
    .container-fluid>.navbar-collapse, .container-fluid>.navbar-header, .container>.navbar-collapse, .container>.navbar-header {
        margin-right: 0;
        margin-left: -40px;
    }
    }
    
    /*right*/
    @media (min-width: 768px) {
    .navbar-right {
        float: right!important;
        margin-right: -45px;
    }
    }
    

    @DownPW said in navigation bar is misplaced when the window gets smaller:

    the solution I found is to move the icons of the navbar to the left to have more room when you click on the search button

    I think perhaps the solution I posted is more elegant - that way, you don’t have to worry about elements shifting when you resize - just a thought 🙂

  • I always have the same problem when I click on the search button with your code. So I keep mine and add yours for the problem of window redimmension 🙂

  • I always have the same problem when I click on the search button with your code. So I keep mine and add yours for the problem of window redimmension 🙂

    @DownPW sounds good.


Did this solution help you?
Did you find the suggested solution useful? Support 💗 Sudonix with a coffee
If your organisation needs deeper expertise around infrastructure, security, or technology leadership, learn more about Phenomlab Ltd. Many of the deeper technical guides behind Sudonix are published there.

Related Topics