Topic: Justify navbar items
Nikita Sarbashev
pro
asked 6 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?
Add comment
Michal Szymanski
staff
answered 6 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%;
}
}
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