Category Archives: css

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.