A
A
Alibek Kulseitov2016-04-10 03:41:47
Bootstrap
Alibek Kulseitov, 2016-04-10 03:41:47

Is it possible to make up media queries with bootstrap?

I've been typing for about two years, I've worked on my adaptive grid. But I realized that the bootstrap grid, namely well-chosen media queries, is better.
I can't figure out for a long time how to position elements that are less than 768px?
Because my grid goes DESKTOP FIRST. And it's much easier for me, I'm used to it.
And how to properly position elements on bootstrap media queries without using its grid, namely such as col-md-2 and so on.

Answer the question

In order to leave comments, you need to log in

1 answer(s)
G
Gleb Kemarsky, 2016-04-13
@AlibekKulseitov

I have reformulated the questions. If something is wrong, let me know.
If the content of the page is wrapped in a container, then it is better to assign the width to it, and not to the body. That's why it's a container.
This is just the min-width of the body tried. But it is not needed here at all, media queries do its work.
Media queries prevent the container from creasing when the user resizes the window. When the window goes beyond one media query, control passes to the next one, which rebuilds the container according to the new rules. So as long as media queries are in effect, min-width is not needed for either the body or the container.
min-width is only needed for the smallest screens so that the container doesn't get too narrow and wrinkle the content. Therefore, in kulseitov.kz/bags/css/grid.css , you can remove all boy min-width, except for the smallest one.
On such screens, bootstrap stretches the container in width - just like ..container-fluid on wider screens.

.container {
  padding-right: 15px;
  padding-left: 15px;
  margin-right: auto;
  margin-left: auto;
}

Alas, in the third version of the bootstrap, a separate category for screens already 480 px disappeared. People asked to return it , but to no avail. Therefore, they engaged in homemade products. Here is a person handing out CSS that adds such a category to the bootstrap grid.
There's a lot of talk about this on Toaster .

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question