Quantcast
Channel: HtmlRenderer Discussions Rss Feed
Viewing all articles
Browse latest Browse all 63

New Post: CSS word-break : break-word vs break-all

$
0
0
I have a situation where I have td elements with a fixed width. If a word happens to be long enough that it will exceed the width of the cell, it will be placed on a new line.

However, if there is a single word on the new line, and that word exceeds the td width, that word will go past the boundary and be cutoff.

word-break:break-all takes care of this by breaking the word at the first letter that crosses they boundary, but word-break:break-word takes the whole word and moves it to the next line.

Is there any way to have the best of both worlds? I want the break-word functionality but I would like break-all if there is only one word on a line that exceeds the boundary.

Thanks!

Viewing all articles
Browse latest Browse all 63

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>