Give some data from server like (width,height box)and text. in html I should create box(or border) and put my text on it. because of the width and height is different and I want my text fill all box. how can i set dynamically font size that all words put in box.
Asked
Active
Viewed 30 times
0
-
You need to do Javascript calculations for that, CSS cannot do this. – connexo Feb 16 '19 at 14:18
-
@connexo - Wrong. You can use rem sizing, which is based on the previous container font size although usually used on the `` tag itself – ggdx Feb 16 '19 at 14:22
-
@ggdx That will not address the problem OP stated. – connexo Feb 16 '19 at 14:27
-
Possible duplicate of [Font scaling based on width of container](https://stackoverflow.com/questions/16056591/font-scaling-based-on-width-of-container) – ggdx Feb 16 '19 at 14:36
-
@connexo how can i handle with javascript? – Android programmer Feb 16 '19 at 14:39