Posted By

apphp-snippets on 02/02/14


Tagged

css urls long apphp


Versions (?)

Prevent Long URL's From Breaking Out with CSS


 / Published in: CSS
 

URL: http://www.apphp.com/index.php?snippet=css-breaking-out-long-urls

This solution will help you to prevent many issues with your site, when you need to prevent long URL's from breaking out of container.

  1. <style type="text/css">
  2. .break {
  3. -ms-word-break: break-all;
  4. word-break: break-all;
  5. word-break: break-word;
  6. -webkit-hyphens: auto;
  7. -moz-hyphens: auto;
  8. hyphens: auto;
  9. }
  10.  
  11. .ellipsis {
  12. width: 250px;
  13. white-space: nowrap;
  14. overflow: hidden;
  15. -ms-text-overflow: ellipsis; /* Required for IE8 */
  16. -o-text-overflow: ellipsis; /* Required for Opera */
  17. text-overflow: ellipsis;
  18. }
  19. </style>

Report this snippet  

You need to login to post a comment.