D
D
Dmitry Kurylenko2021-02-09 21:43:11
Bootstrap
Dmitry Kurylenko, 2021-02-09 21:43:11

How to override Bootstrap media queries?

Dear colleagues! Help me please. Unable to override Bootstrap v4.6 media queries. Bootstrap styles the navbar: media (min-witdh: 992px) {
.navbar-expand-lg {
flex-flow: row nowrap; justify-content: flex-start;
}
}
And I need all this to work at 1155px. When I write all this in my style.css, nothing changes. Those. my styles appear in the console, but Bootstrap's ones also remain at the same 992px breakpoint. Thank you for considering my issue.

Answer the question

In order to leave comments, you need to log in

1 answer(s)
I
iBird Rose, 2021-02-09
@websetter

1155px is not included in the standard bootstrap breakpoints. the correct solution would be to redefine this variable in scss variables once you have such breakpoints.
also .navbar-expand- can be another {-sm|-md|-lg|-xl}. for example with .navbar-expand-xl will fire at 1200px

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question