Problem in Responsive font size | Sololearn: Learn to code for FREE!
New course! Every coder should learn Generative AI!
Try a free lesson
0

Problem in Responsive font size

if I give font size in pixels, for example font size of <H1> is 65 PX. it looks good in desktop and laptop but in phone view it's too big and it's not responsive

25th Aug 2017, 6:32 AM
Darshan K M
Darshan K M - avatar
2 Answers
+ 5
Pixel (px) is an absolute unit, you should consider to use relative unit instead (e.g. em, vw etc.) Otherwise you may consider to set different font size via media query.
25th Aug 2017, 6:40 AM
Zephyr Koo
Zephyr Koo - avatar
+ 1
Well I tried playing with it on my notepad and didn't find any answer because percentage doesn't work if I wanted it to be ascertain percent from parents width.. I guess that the answer is like most sites there is a mobile site like Facebook.com there m.facebook.com where everything is Coded differently
25th Aug 2017, 7:49 AM
Elad Goldenberg
Elad Goldenberg - avatar