Justify navbar items

Nikita Sarbashev pro asked 9 years ago

Hi, I want to justify navbar items on md+ screens. Added custom style @media only screen and (min-width: 768px) { .navbar-nav { display: flex; justify-content: space-around; } } It works fine, but if I change browser size from xs to md, navbar goes hidden. Could you advice how to solve it?

Michal Szymanski staff pro premium priority answered 9 years ago

Hi, what version of MDB do you use?

Nikita Sarbashev pro answered 9 years ago

Michal, MDB4.

Michal Szymanski staff pro premium priority answered 9 years ago

Try this code:
@media only screen and (min-width: 768px) {
            .navbar .navbar-nav {
                display: flex;
                justify-content: center;
                align-items: center;
                height: 100%;
            }
        }

Please insert min. 20 characters.

FREE CONSULTATION

Hire our experts to build a dedicated project. We'll analyze your business requirements, for free.

Status

Specification of the issue
  • User: Pro
  • Premium support: No
  • Technology: General Bootstrap questions
  • MDB Version: -
  • Device: -
  • Browser: -
  • OS: -
  • Provided sample code: No
  • Provided link: No