css3 Icon Logo
me@grafxflow

Written by me@grafxflow

12 Oct, 2012

0

2,608

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

Share this article

Add comment

Smart Search

me@grafxflow Author Profile picture

me@grafxflow

Founder, Grafxflow

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. I build lighting-fast dynamic content engines with Laravel, Winter CMS and Tailwind CSS. Thanks for stopping by!