Home › Forums › CSS › Prevent word breaks › Reply To: Prevent word breaks
November 17, 2013 at 2:13 pm
#156335
Participant
I added a span class called nobreak and wrapped the paragraphs and it’s all across the screen.
You misunderstand: don’t wrap the paragraphs (unless you want them all across the screen). Wrap the words that you don’t want to break.
<p>This is my paragraph. It will wrap normally, except for the part about <span style="white-space:nowrap">happily-hyphenated-hillbillies</span>.
Having justified text is going to be a nightmare on a responsive site — or with narrow columns.
Yeah. At the very least, make sure any justified text is in a container with a minimum width.