How to make a wrapper div for content without spaces?

I am trying to get a DIV element for its contents, even though the content has no spaces. The content is a nucleic acid sequence, so inserting spaces in each x-character is possible, but I would prefer to do it more elegantly, if possible.

eg.

<div></div> 

I do not need to support every browser. I'm mostly interested in Chrome, Safari, and Firefox and other standards-compliant browsers.

+4
source share
2 answers

A CSS style like this will help:

word-wrap:break-word

Other CSS settings that control packaging are described here .

+7
source

You can use a β€œzero-width space break” (& # 8203;), which will break the word, but will be ignored when copying, say, to notepad.

+2
source

All Articles