Force a break or wrap on a string output

I am using something like this to output some data:

<cfoutput query="myquery">#myvariable#&nbsp;</cfoutput>

This outputs something like this:

happy sad nice car plug phone desk monitor table etc.....

I would like to make it word wrap at some point but it just runs off of the page. I tried putting the output in a table cell and sizing that cell. I also tried putting it in a div and giving that div a width but the string still just outputs right off the side of my screen and outside of my web template.

Could someone assist with a way to make this wrap?
Who is Participating?
gdemariaConnect With a Mentor Commented:
Change the non-breaking space to a regular space and it will wrap..

<cfoutput query="myquery">#myvariable#&nbsp;</cfoutput>


<cfoutput query="myquery">#myvariable#     </cfoutput>
earwig75Author Commented:
LOL thanks. I think I am braindead today.
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.