Jump to content

Fitting text to a table.


Vigilant Psyche

Recommended Posts

Yes but what sort of argument would I use? 10 letters? This would not be appropriate as it would stop short sometimes and overflow other time because eg "M" is longer than "I". So I want to be able to stick in a newline if its over X pixels.

 

Really? I thought we number anticlockwise? Oh no, I have my chem exam in a month! XD

 

EDIT: so it would auto matically split a word that was to long, even if there are no spaces like "ooooooooooooooooooooooooooo"?

Link to comment
Share on other sites

I understand...you might be able to find something with Javascript, but with PHP you can only work with the number of characters a string has. There is no way to calculate (from PHP) what the length of each character is and if it will fit. PHP doesn't know how the users browser will interpret the characters. Maybe the browser doesn't have the font you suggest using, so it uses something else. Or maybe the user has selected to have the font on all pages enlarged to make it easier to read.

Link to comment
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.