Answer the question
In order to leave comments, you need to log in
How to set the minimum site width on mobile devices?
Good day to all. The question arose when developing a site with an adaptive design. Is there any way to set the minimum site width in pixels in the meta name="viewport"
. For example, do not reduce it to less than 600px if the screen width is less than the specified size, but apply scaling. If the screen width is more than 600px, then display the site according to the width of the device. Thanks in advance for your reply.
Answer the question
In order to leave comments, you need to log in
Usually use:
<meta name="viewport" content="width=device-width, initial-scale=1">
<meta name="viewport" content="width=600, initial-scale=1">
html, body {
width: 100%;
}
#page {
/* максимальная ширина страницы - 600px */
width: 600px;
}
@media all and (max-width: 600px) {
#page {
/* максимальная ширина страницы - 100% - для телефонов */
width: 100%;
}
}
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question