M
M
massef2014-02-28 21:00:28
css
massef, 2014-02-28 21:00:28

Are intermediate values ​​needed in Media Queries?

Greetings.
For example, there is a layout with the following dimensions:

max-width: 1400px;
min-width: 1000px;
width: 100%;

I need the layout not to collapse with a width of 1366 => 1280 => 1024
I am writing a media query:
@media only screen and (max-width : 1366px) {.....}
@media only screen and (max-width : 1280px) {.....}
@media only screen and (max-width : 1024px) {.....}

At the specified points, the layout is as it was intended, but for example, in the intervals, say, between 1280 and 1024, for example, at point 1132, some elements do not behave correctly.
Actually the question is, is it necessary to prescribe these breakpoints in the media query in order to correct the layout at these points?
After all, the browser, for example, on a tablet will open at a resolution of 1024x768 and, therefore, the layout will look as it should, but on the other hand, when scaling, it collapses.
Perhaps I misunderstood something and got confused. It is necessary that the layout simply shrinks from 1400 to 1000, but at the same time, the internal elements are not rebuilt, as in the case of adaptive layout, but also compressed. Am I specifying media queries correctly for such a task?

Answer the question

In order to leave comments, you need to log in

3 answer(s)
S
Sergey, 2014-02-28
Protko @Fesor

There are so many screen resolutions now that it makes no sense. You just need to take the browser window, and reduce (or increase), tracking the reaction. If at some stage you need to regroup elements, resize, etc. - then for this permission, put a block and so on ... In a word, only as needed. The fact that you put several blocks under some standard permissions will not save you.

Y
Yuri Lobanov, 2014-02-28
@iiil

Media queries are good when you are comfortable with layout in intermediate values. Let me give you an example: if your page is a class="cont" container with a certain width, located in the middle of the screen, then you can make it three widths through media queries, and on the fourth width make all blocks in a column (for mobile browsers) .
If you are making a rubber page, then you don’t need media queries here in the first place, but first of all, you need to set the size in percent.
Even if you list all page sizes (which is not realistic), then do not forget about those cases when the user's browser is not full screen.

A
Alexander Petrov, 2014-02-28
@dzhiriki

Why do you need media queries here?
Specify the dimensions in percent when layout and that's it. When you change the screen size, everything will proportionally decrease and that's it.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question