+ 1

Text go small and big

I want to make the text go small when i minimize the window and go big when i make the window full the screen.. But when i use the ( font-size ) the text become the same in any mode of window. How can i do that?

23rd Mar 2019, 5:11 PM
Ahmed Mohamed Zanaty
Ahmed Mohamed Zanaty - avatar
2 odpowiedzi
+ 2
You can use units like vh or vw. That will allow you to set font size relatively to window size.
23rd Mar 2019, 6:24 PM
Jan Štěch
Jan Štěch - avatar
+ 4
//You can use font-size :10vw; instead of px https://www.w3schools.com/howto/howto_css_responsive_text.asp
23rd Mar 2019, 6:26 PM
Sudarshan Rai
Sudarshan Rai - avatar