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"?

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.

Archived

This topic is now archived and is closed to further replies.

×
×
  • 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.