Jump to content

Recommended Posts

Ok, i checked out the wrapword function and it isn't what I am looking for because what I want to do is make it so the content of something a user submits, if it is too long, won't stretch out the table, it will make a break. I need this because quite obviously 100 "1"s will be much less width than 100 "W"s.

 

All-in-all, is there anyway to make a wordwrap if the word is longer than the table width?

 

~Shaun

Link to comment
https://forums.phpfreaks.com/topic/50870-question/
Share on other sites

That should be handled in the display, not the programming. When you construct your table give the table a fixed width (and give columns fixxed widths if you like). The data in the cells will wrap accordingly.

 

However, if you have a very long string without and spaces, commas, or other "break" characters the browser will not hbe able to determine where to wrap it at. In that situation, there is not solution that I know of for web technology. I could do it with PostScript, but that's not relevant here.

 

And there is a good reason for this. If you were to break a word int he middle it could create an entirely different meaning.

Link to comment
https://forums.phpfreaks.com/topic/50870-question/#findComment-250217
Share on other sites

Ok, so how does a forum like this break this word:

 

1111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111

 

EDIT: Lol, nvm.

Link to comment
https://forums.phpfreaks.com/topic/50870-question/#findComment-250263
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.