Answer the question
In order to leave comments, you need to log in
How do media queries work, why doesn't it work?
Greetings, I can’t understand how media queries work, for all video tutorials and articles, for example, such a media query is indicated, as
far as I understand, this query should work on a Laptop, I go to Google Chrome, go to code editing and specify this width above (992px ) and in the media query I change all the elements so that everything looks normal with this browser width
BUT when I open the site on a laptop, the main Desktop version opens, and it does not look normal because it is much wider than the browser window.
At the same time, when I make a request
, everything works as I need
. What am I doing wrong? @media screen and (max-width: 992px)
@media screen and (max-device-width: 1400px)
Answer the question
In order to leave comments, you need to log in
max-width means "to" (inclusive)
min-width means "from" (inclusive)
i.e. your styles are applied to the browser width up to 992px inclusive
Starting from 993, these styles are disabled.
max-device-width: 1400px
means "display size up to 1400". Display (device), not browser.
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question