I am trying to create a responsive footer, but this is probably interesting for other sensitive elements too.
Is it possible to hide an element if the line is split into its position?
<footer>
John Doe · Main Street 123 · Sometown · +12 3456 789
</footer>
I want for wide screens:
John Doe · Main Street 123 · Sometown · 012 3456 789
And for small screens, for example:
John Doe · Main Street 123 · Sometown
012 3456 789
or
John Doe · Main Street 123
Sometown · 012 3456 789
and etc.
Thus, the separation point disappears if there is a line break, because it is no longer needed and does not look beautiful at the end or at the beginning of the line.
Edit: Some possible markup
<footer>
John Doe<span class="hide-when-linebreak"> · </span>Main Street 123<span class="hide-when-linebreak"> · </span>Sometown<span class="hide-when-linebreak"> · </span>+12 3456 789
</footer>
Did not find a solution for this, maybe there is an idea how to start?
thank
source
share