1

How can I break real words by hypens:auto; and words that where not touch by that algorithms with word-break: break-all ?

In other words how to transform that:

Unabhaengigkeitserklaerungen
****************************

Into:

Unabhaengigke
itserklaerungen
**************
***************

(Or something very similar)

UPDATE:

OK. The main issue steam to be that my layout consist of two columns. Left one will contain two tables one after the other. First table will contain some long string of "*".

This breaks algorithm for calculating widths, and table is NOT resizing as expected. Overflow-y will never be used as FF will NOT decrease width below length of that '*' word.

SOLUTION: (Will update is as answer as soon as moderators remove "Duplicate" from this question)

Use:

  • table-layout: fixed for both tables.
  • Use % for every column widht
  • Use following CSS for word breaking:

    /* These are technically the same, but use both */
    overflow-wrap: break-word;
    word-wrap: break-word;
    
    -ms-word-break: break-all;
    /* This is the dangerous one in WebKit, as it breaks things wherever */
    /* Instead use this non-standard one: */
    overflow-wrap: break-word;
    
    /* Adds a hyphen where the word breaks, if supported (No Blink) */
    -ms-hyphens: auto;
    -moz-hyphens: auto;
    -webkit-hyphens: auto;
    hyphens: auto;
    
przemo_li
  • 3,932
  • 4
  • 35
  • 60
  • This example , in particular **http://stackoverflow.com/a/19344395/5916150** – Arif Burhan Mar 09 '16 at 16:05
  • Mods, please look into my solution. Its unique and not applicable to questions its supposed to be duplicate of. Please remove duplicate status. – przemo_li May 06 '16 at 11:41

1 Answers1

1

Use alternating spans with break or no-break set as required.

Arif Burhan
  • 507
  • 4
  • 12