Home » Code Snippets » css wordwrap
how do make a big word break into two html?
This problem focuses on solving the problem of wrapping words inside the table data. The table will wrap all the words automatically but sometimes the table will expand. To solve the problem we’ll use a combination of CSS properties to make it work in most of the browsers if not all.
Wrapping inside the Table Data
This is the problem:
Html:
<table border="1" width="200">
<tr> <td>bbbbbbbbbbbbbbbbiiiiiiiiiiiinnnnnnnnnnngggggggggggoooooooooooobbbbbbbbbbbiiiiiiinnnnnnngggggggooooooobbbbbbbbbbbiiiiiiinnnnnnngggggggooooooo and bingo was his name
</td>
</tr>
</table>
The solution :
.breakproof {
overflow-wrap: break-word;
word-wrap: break-word;
-ms-word-break: break-all;
word-break: break-all;
word-break: break-word;
-ms-hyphens: auto;
-moz-hyphens: auto;
-webkit-hyphens: auto;
hyphens: auto;
}
This will output the data as expected. However, wrapping words may break it and won't make much sense.
Here is what we did to the code
<table border="1" width="200">
<tr>
<td class="breakproof">bbbbbbbbbbbbbbbbiiiiiiiiiiiinnnnnnnnnnngggggggggggoooooooooooobbbbbbbbbbbiiiiiiinnnnnnngggggggooooooobbbbbbbbbbbiiiiiiinnnnnnngggggggooooooo and bingo was his name
</td>
</tr>
</table>
Similar Tags:
- all css words
- auto break line css
- break a single word to next line css
- break a word in css
- break all words css
- break down css
- break down text html
- break in the middle of word css
- break line css text
- break paragraph css
- break sentence css
- break sentence with ... css
- break text line css
- break the word in css
- break word for line break css
- break word html
- break word in css
- break word no css
- break word to next line css
- break word tonext line css
- break word with - css
- break words background css
- break-word css
- break-workd css
- breakall in css
- breaking words css
- breal øetters css
- brekaword css
- check when css break-word
- css auto break line
- css breack line text
- css break all
- css break line
- css break text
- css break the text
- css break word
- css break word break all
- css break word to next line
- css font break
- css keep word un
- css no word break
- css p break word
- css property get ... after word
- css text auto break line
- css text break
- css text word break
- css word brak
- css word break css
- css word break not
- css word breaks
- css word breka
- css word values
- css word-break
- css work break
- cut word css
- devide words css
- how to brake word in html
- how to break a word in css
- how to break all sentences in css
- how to break text in css
- how to break text using css
- how to break the text in css
- how to break word in css
- how to break word in html
- how to madd word preak css
- how to make a big word break intotwo html
- how to stop word break in css
- how words in a single line to have different css properties in html
- html allow word to be split
- html break-word
- html css break word
- html css break work
- html make break word
- html style break word
- html style word-break
- html word break
- html word in next line
- line break html css
- make word reach end of p css
- p word break
- text break css
- text break css property
- text break html
- text break in css
- text breaks css
- whow to break sentence in css
- Why do the words come on next line html
- word break applying
- word break css
- word break css no break
- word break css on n
- word break css style
- word break every single word css
- word break html &
- word break in css
- word break in html
- word break none css
- word break problem css
- word breaking in css
- word breap css
- word carry over css property
- word cut html '-'
- word in css
- word property css
- word- break
- word-break css default value
- word-break: break-all;
- word-break: break-all; in a border
- word-break:break-word; css
- wordbreak css
- wordbreak css3
- words going down html
- work-break css