I have some tables with some long unbreakable formulas I want to make 100% width and not extend any further out, just wrap if need be. I have tried word-wrap: break-word
combined with width: 100%;
and for the most part this works fine except where the formula has hyphens in it (actually meaning minus), here it will try to break it at the hyphens only, not anywhere else during the word, even though this causes the table layout to break and extend as the hyphens are far apart.
I can fix it by using table-layout: fixed;
but then it makes all the columns of each table the same width, which makes it looks ugly where I have a column with lots of a text and a column without much text in it.
Is there a property which can disable wrapping at hyphens or even a character I can use that looks like a hyphen but isn't treated as one?
Here is an example of a problem formula (excel formula):
....
<td>
<p class="mono first">=IF(Case_Selected="MEDIUM - BASE CASE",EOMONTH(VLOOKUP(A3,ContractData,3,FALSE),60-1),IF(Case_Selected="LOW",EOMONTH(VLOOKUP(A3,ContractDataLow,3,FALSE),60-1),IF(Case_Selected="HIGH",EOMONTH(VLOOKUP(A3,ContractDataHigh,3,FALSE),60-1),0)))</p>
</td>
....
The mono
class just makes the font monospaced and first
removes the text indent (this is part of an ebook).
This cell will only break at the 60-1
parts as I think it's treating that like a hyphenated word.