F
F
fastovvlad2018-02-13 19:45:43
css
fastovvlad, 2018-02-13 19:45:43

How to make a responsive css font?

The website has a menu! It looks good on a computer, but on smaller gadgets, the font is too small, how best to write in css so that, depending on the screen size, the font size in the menu changes?
5a8315d568c3e749305686.png5a8315dedd4c8178348870.png

Answer the question

In order to leave comments, you need to log in

6 answer(s)
A
Ankhena, 2018-02-13
@fastovvlad

Responsive websites require the meta tag:
Then set the desired dimensions in the appropriate intervals of media conditions.
But you need to understand that you will probably have to redo not only the font size.

A
Anton Shamanov, 2018-02-13
@SilenceOfWinter

set the font size not in px, but in em\rem.

A
Andrey Fedorov, 2018-02-13
@aliencash

https://habrahabr.ru/company/mailru/blog/315196/

E
Evgeny Zaharov, 2018-02-13
@drymind404

Set text sizes, various indents, which should decrease when the resolution decreases, using em and rem units, make several breakpoints in media-queries where to reduce the font-size of html depending on the resolution. It is better for several elements to set fixed sizes, in px. For example, paragraphs. Otherwise, as you have, there is an excessive decrease in fonts. In my sites, I usually set p { font-size: 16px; before starting development; } - then the text is equally well readable on any device. Some less important text, showing, for example, additional information and the like, can be made smaller, for example 12-14 px.

I
Igor, 2018-02-14
@iluminat777

This is not a bad article.
https://www.smashingmagazine.com/2016/05/fluid-type...

F
Fatima_dag, 2022-01-15
@Fatima_dag

The best way in my opinion. Smooth adaptation with setting the initial and final size https://youtu.be/HJZP5QsrpXs

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question