Quantcast
Channel: What is the best way to break HTML text on slashes (/)? - Stack Overflow
Viewing all articles
Browse latest Browse all 3

What is the best way to break HTML text on slashes (/)?

$
0
0

I have an HTML table 360px wide, which works great. The challenge is that sometimes a url appears http://this/is/a/really-really-really-really-really/long/url in the text. This causes the table to expand horizontally and a scroll bar appears on the bottom.

I don't think overflow:hidden will work because half of the text would be hidden.

What is the best way to force breaking the line on slashes (/) and dashes (-) in CSS (hopefully)?

It should work with IE7+, Chrome, Firefox and Safari.

Working in Rails 3 and jQuery.


Viewing all articles
Browse latest Browse all 3

Latest Images

Trending Articles





Latest Images