word-wrap

The word-wrap property was invented by Microsoft and added to CSS3. It allows long words to be able to be broken and wrap onto the next line. It takes in two values; normal or break-word.

In the first paragraph below, normal is used. This is the same as if the property wasn’t used, i.e. the long word breaks out of the box as there isn’t enough width for it to be fully contained in the box. In the second paragraph, break-word is used and the long word is broken into two pieces, so that the second part wraps onto the next line.

This is currently supported in IE, Safari, and Firefox 3.1 (Alpha).

This paragraph has long words thisisaveryverylongwordthatisntreallyoneword and again a longwordwithnospacesinit

This paragraph has long words thisisaveryverylongwordthatisntreallyoneword and again a longwordwithnospacesinit


OUR SPONSORS

Advertise here?
TAG CLOUD