How to do word wrap with css

Written by Sony on 31 March 2010 in , | 23 Comments

Many times we need to do word wrap using lanugages. I recommend use css for word wrapping.
You can force long (unbroken) text to wrap in a new line by specifying break-word with the word-wrap property.
This is a problem with CSS layouts that use floated divs.
Use following code for fix the word wrap with all divs.

div { word-wrap: break-word }

instead of this we always use following css code:

overflow:hidden;

But this is not good practice. Use word-wrap css property.
Word-wrap is supported in IE 5.5+, Firefox 3.5+, and WebKit browsers such as Chrome and Safari.

Tags: ,

23 Responses to “How to do word wrap with css”

  1. How often do you write your blogs? I enjoy them a lot 6 1 6

  2. Social comments and analytics for this post…

    This post was mentioned on Twitter by wordpressapi: How to do word wrap with css http://bit.ly/asfobk...

  3. Hey hows it going Al! I was just wondering on your comment about C++0x extending C++.

  4. free ebook says:

    This is a great site.  Good clean interface and nice informative articles. I will be coming back in a bit, thanks for the great article.

  5. That is very sublime stuff. Never new that beliefs could be this varied. Thanks for all the enthusiasm to extend such helpful information at this site.

  6. Thanks for taking the time to chat about  this, I feel  fervently  about this and I benefit from learning about this subject.  Please, as you gain information, please add to  this blog with more information.  I have found it really useful.

  7. How-do-you-do, just needed you to know I have added your site to my Google bookmarks because of your extraordinary blog layout. But seriously, I think your site has one of the freshest theme I’ve came across. It really helps make reading your blog a lot easier.

  8. Took me time to read all the comments, but I really enjoyed the article. It proved to be Very helpful to me and I am sure to all the commenters here! It’s always nice when you can not only be informed, but also entertained! I’m sure you had fun writing this article.

  9. This is my first time i visit here. I found so many interesting stuff in your blog especially its discussion. From the tons of comments on your articles, I guess I am not the only one having all the enjoyment here! keep up the good work.

  10. Nice information, many thanks to the author. It is incomprehensible to me now, but in general, the usefulness and significance is overwhelming. Thanks again and good luck!

  11. Thanks for taking this opportunity to discuss  this, I feel strongly  about it and I take pleasure in learning about this topic.  If possible, as you gain information, please add to  this blog with new information.  I have found it extremely useful.

  12. diswasher says:

    Recently, I didn’t give so much thought to writing comments on blog entries and have left comments even less. Checking out your insightful page, will probably encourage me to do so more regularly.

  13. You’re a Really Professional Blogger, You either have got quality knowledge of what your discussing or you did some great research. Thanks for this excellent post.

  14. Great Blog. I add this Post to my bookmarks.

  15. You certainly deserve a round of applause for your post and more specifically, your blog in general. Very high quality material.

  16. Kredyty says:

    I’ve been visiting your blog for a while now and I always find a gem in your new posts. Thanks for sharing.

  17. Very Interesting Information! Thank You For Thi Post!

  18. Kredyty says:

    You certainly deserve a round of applause for your post and more specifically, your blog in general. Very high quality material.

  19. I just book marked your blog on Digg and StumbleUpon.I enjoy reading your commentaries.

  20. Very Interesting Blog! Thank You For Thi Post!

  21. Thank You For This Post, was added to my bookmarks.

  22. vemmayo says:

    You certainly deserve a round of applause for your post and more specifically, your blog in general. Very high quality material

  23. noni juice says:

    I just book marked your blog on Digg and StumbleUpon.I enjoy reading your commentaries.

Leave a Reply

Wordpressapi is developer code book.
wordpressapi on Facebook
© 2010 Wordpressapi. All Rights Reserved. Reproduction without explicit permission is prohibited.