BlueChippy BlueChippy - 1 year ago 108
HTML Question

Stop html table cell breaking on minus sign and instead on decimal point?

Is it possible to stop a TD breaking on the minus sign of a value and instead make it break on the decimal point?

I have a table displaying decimal amounts from a database. Some of the amounts are large and need to wrap somehow.

At the moment, when a value exceeds my TD's width it get truncated as follows:


But Is there any way to make it break as:


without having to manually intervene and format the strings? i.e. can it be done in css or another way?


Both of these work in Firefox, but not in IE8 (second and third columns are


enter image description here

Answer Source

Try using the <wbr> tag like so:


To make it more browser compatible you can use this too: (ref)

Recommended from our users: Dynamic Network Monitoring from WhatsUp Gold from IPSwitch. Free Download