Answers for "text wrapping with css ..."

7

css wordwrap

.ow {
  overflow-wrap: break-word;
  word-wrap: break-word;
  hyphens: auto;
  white-space: normal; //this is the one that gets you all the time
}
Posted by: Guest on May-08-2020
0

css force string to wrap

<!-- For Block Elements -->
<textarea style="width:100px; word-wrap:break-word;">
  ACTGATCGAGCTGAAGCGCAGTGCGATGCTTCGATGATGCTGACGATGCTACGATGCGAGCATCTACGATCAGTC
</textarea>

<!-- For Inline Elements -->
<span style="width:100px; word-wrap:break-word; display:inline-block;"> 
   ACTGATCGAGCTGAAGCGCAGTGCGATGCTTCGATGATGCTGACGATGCTACGATGCGAGCATCTACGATCAGTC
</span>

<!-- Another thing to try: -->
<tr style="overflow-wrap: anywhere"><td>1</td><td>2</td></tr>
Posted by: Guest on November-05-2020

Browse Popular Code Answers by Language