I have a datatable and within each cell of the last column I place a regular table. I need data to be displayed exactly in those tables, but I noticed if there's an extra space between two words it gets removed so that there's only 1 space character.
Turns out that is HTML behavior, and I found this solution along with a solution specific to Datatables.
However, when I apply white-space:pre;
to datatable's <td>
elements so the spaces wouldn't get removed, it breaks the CSS that I have on the tables:
Compared to how it's supposed to look, as it looks before adding white-space:pre;
to each cell:
Here is the link to code with the recreated issue: https://jsfiddle.net/c4pjrs0L/4/
What is the cause of this? Specifically, the inner table not aligning at the top anymore and each button being displayed on a new line.
All I'm really trying to do is prevent html from trimming the extra spaces between words across the whole website.