PHP Determining Font Size based off of width -
I have the fixed width of an element, and an unknown string length that is inserted by the user. I am trying to keep javascript out, otherwise this problem will be solved using the jQuery method described in other positions.
I am generating a static page with PHP which will not change and I am trying to calculate the size of the text to fit within the Div.
Is this just the following: string length - width of the container - server side with PHP
And can you please give me a hand to find the right solution?
Cheers
If this is about an HTML element, then you get 100 Can not set the width of PHP with% reliability You really have to find an element in the client browser, and it is possible that using javascript only.
Li>
By manually defining the width of the element with a normal zoom, you can be the best (or if it is dynamic Text, maybe what a judge has been proposed)
Comments
Post a Comment