Question
Given a relatively simple CSS:
<div style="width:150px;">
12333-2333-233-23339392-332332323
</div>
How do I make it so that the string stays constrained to the width of 150, and simply wraps to a newline on the hyphen?
Answer
Replace your hyphens with this:
­
It's called a "soft" hyphen.
< br > via < a class="StackLink" href=" http://stackoverflow.com/questions/904/" >In HTML, how to word-break on a dash?< /a>
0 comments:
Post a Comment