Break and Wrap a long word

A situation occurred while doing chat implementation. Someone just typed a long word which was way larger than the div container. The entire page started looking ugly with that single chat message because it extended outside the chat div. I found a solution with the help of Google in css(I feel it’s css3).

word-wrap: break-word;

This one will break the word and wrap it in the defined div. word-wrap has another option, normal, which will keep the word in the same form.


About Odol Shinu

I've completed my B Tech in Information Technology in 2010 from Government Engineering College Sreekrishnapuram Palakkad under Calicut University.

Posted on October 23, 2012, in css and tagged , . Bookmark the permalink. Leave a comment.

Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out /  Change )

Google+ photo

You are commenting using your Google+ account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )


Connecting to %s

%d bloggers like this: