P
P
Pavel2021-02-18 20:55:44
css
Pavel, 2021-02-18 20:55:44

How to change the font on the mobile version of the site?

There is a problem, I am writing an article or a post on the site in one font, which already looks too large and unreadable on the phone. Moreover, if I make the font optimal for a mobile device, then on the computer I have to peer into it and try to read it. How and is it possible to write some kind of CSS code to change the font. And this is the problem that I only need to do this for one article template in MODX.

Answer the question

In order to leave comments, you need to log in

1 answer(s)
O
Oleg, 2021-02-18
@lolzqq

the page section <head>must have a meta tag

<meta name="viewport" content="width=device-width">

and in CSS for different screen sizes, you need to register the appropriate media queries of the following form:
@media (min-width:720px){
      body{
           font-size: 16px;
      }
}

and in this single template use such css file

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question