I have several data (say a name, an address, a telephone number, an e-mail address) in a row, because they occupy the thin footer of a webpage.
They are separated by a space-dash-space construct, like this (but centered):
Name - address - phone - mail address
On small screens, the whole page is smaller and the text wraps. I'm already making use of no-breaking spaces and word wraps to ensure that everything falls in place but the result is not satisfying.
What I get is:
Name - address -
phone - mail
What I want is:
Name - address
phone - mail
Is there any way, with CSS or JS, to dynamically hide some characters if they happen to be located at the start or at the end of a line?
If not, feel free to suggest different solutions that don't involve changing the original formatting of the text. Shall I find no solution, I will opt for:
- Name -- address -- phone -- mail -
turning into:
- Name -- address -
- phone -- mail -
or something like that.