Blog

12 Oct
2012

css3 Icon Logo

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

Tagged: < css | example | word-wrap >
Posted in: < PHP and HTML and CSS >
me@grafxflow avatar

me@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. Thanks for stopping by!

Visitors also viewed these posts


Add comment

Add comment