Answer the question
In order to leave comments, you need to log in
How to zoom in on a fixed width website?
Hello!
There is a fixed width page, 940px. The font size is 14px.
How to make it so that on any device this page automatically scales to 100% of the device screen width when the screen is opened or rotated, and at the same time, if the screen width is 640px or less, then the font size becomes 16px?
Answer the question
In order to leave comments, you need to log in
These are media queries.
htmlbook.ru/css/value/media
A simple example:
body {
width: 940px;
}
@media all and (max-width:940px) {
body {
width: 100%;
}
}
through CSS, to stretch to full width:
for a font with a size less than the specified one, you can use a media query, also in CSS:
@media only all and (max-width: 640px) {
(селектор) {
font-size: 16px;
}
0) see how people do
https://vimeo.com/33180097
habrahabr.ru/post/119127
1) add the viewport meta tag so that the browser knows that the page is responsive
2) write media in css
@media (max-width: 1000px) {
.wrap {
width:100%;
}
}
@media (max-width: 640px) {
body {
font-size:16px;
}
}
и т.п.
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question