The forums ran from 2008-2020 and are now closed and viewable here as an archive.

Home Forums CSS Prevent word breaks Reply To: Prevent word breaks


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.