Skip to content
loading...

How to adjust the font size based on the content (which is a number and string) in a container?

jmjjeena profile image J E E N A R J U N twitter logo ・1 min read

I am having a container which takes in the amount and the currency. As the amount gets bigger and reaches near to the right padding (i.e., 16px), the font size should be reducing. At the same time the top padding of the currency should also change.

https://jsfiddle.net/jmjjeena/uzsL7n0c/

//////////////// REACT /////////////////
twitter logo DISCUSS
Discussion
markdown guide
Classic DEV Post from Aug 13 '19

How open-source will Tumblr become?

In case you hadn't read the news, Verizon sold Tumblr to Automattic. Verizon owned Tumblr after it ac...

J E E N A R J U N profile image
Fashion Management graduate to Software Engineer!