Jump to content
  • Advertisement
Sign in to follow this  
3dmodelerguy

[web] wrapping text

This topic is 4595 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

Ok I am not sure if this is m,ysql/php/css issue. I have a working php script that reads in the 30 newest news items form mysql database and print them on on the websites along with css for formatting. What I started to notice after add php and mysql is that if I write none stop test no white line like: hasdofajshadbjckbnawergkasnbdrkahgsdknbfckashgfaksygdrkjbrsadkhsvjhzxnbfvawkjsrgaksjdbnfknasbfkjshgadfkbv That test goes over the potion of space it should, it is like the text will not "wrap" if there is no space. is there a way a wrapping text even if there is no space?

Share this post


Link to post
Share on other sites
Advertisement
You could use the proprietary IE word-wrap: break-word; style in your CSS but remember that this will make Santa cry.

Share this post


Link to post
Share on other sites
You could break it up server-side. Take a look at PHP's wordwrap() function. Also look at the attached comments on that manual entry. It has several user-written wrapping functions you could use instead of wordwrap().

Share this post


Link to post
Share on other sites
In PHP, I just wrote a simple (perhaps slow) word-wrapping function myself, where I can have my own max-chars-per-line and which characters it can break (so not only on spaces). I guess there still isn't an attribute that does this for you.

Share this post


Link to post
Share on other sites
Sign in to follow this  

  • Advertisement
×

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

We are the game development community.

Whether you are an indie, hobbyist, AAA developer, or just trying to learn, GameDev.net is the place for you to learn, share, and connect with the games industry. Learn more About Us or sign up!

Sign me up!