css3 Icon Logo
me@grafxflow

Written by me@grafxflow

12 Oct, 2012

0

1,630

What is the CSS word-wrap property used for?

A wonderful CSS property is the word-wrap. For example let's say there is a website which has a dynamic RSS feed and its div container is not wide enough to show long urls. By default they will overlap the div or paragraph container... which doesn't look good! With word-wrap it forces the long url to break and wrap onto the next line.

This is an example of the CSS usage:

.large_url_container {
    word-wrap: break-word;
}

And here is an example without the CSS word-wrap property...

http://www.websitewithlargeurl.com/url_category/url_sub_category/url_page

... and with the CSS word-wrap property added.

http://www.websitewithlargeurl.com/url_category/url_sub_category/url_page

Add comment

Smart Search

119 Following
50 Followers

me@grafxflow

Hull, United Kingdom

I am a Full-stack Developer who also started delving into the world of UX/UI Design a few years back. I blog and tweet to hopefully share a little bit of knowledge that can help others around the web. Thanks for stopping by!

Follow