On Firefox, how can you justify text that has the white-space: pre-wrap;
CSS attribute?
I need the pre-wrap
to prevent the browser from collapsing whitespaces, but it breaks the text-align: justify;
property. See http://jsfiddle.net/xpp48knq/ for example.
I would be ok with any solution that doesn't collapse spaces and that justifies content.
Here's some workaround for ur problem.
U should remove 'white-space: pre-wrap' from the element, and replace all spaces in text to ' '(mean zero-width space plus space). And everything will be working fine in every major browser.
Here's some example: https://jsfiddle.net/gvm3x354/