Long URL link text not goes in next line in iPhone and breaking out of container

Long URL link text not goes in next line in iPhone and breaking out of container

Today, when i am working with the responsive design and doing testing with iPhone and other smartphone, I found one issue which is related with the long URL text, where there is a URL whose length is more than certain characters and its break the container (div) and goes out of the screen, because of this I am not able to read the full url in my iPhone screen and other smartphone screen. As i knew that word-wrap is not working and long url is not goes to next line because there is not any space in between the url link. So basically auto word-wrap is working with the text but not working with the url link and long urls breaking out of container in my case, if you have same issue then I have a solution for that, its simple css trick, you need to apply one css class with the below code in that class.

 
.LongLinks{
    -ms-word-break: break-all;
     word-break: break-all;
     word-break: break-word;
     -webkit-hyphens: auto;
     -moz-hyphens: auto;
     hyphens: auto;
}

This is working fine with all the latest browsers and all the smartphones including iphone series, Samsung galaxy series, Motorola android phones etc…