whitespace - Avoid line break between html elements -
i have <td> element:
<td><i class="flag-bfh-es"></i> +34 666 66 66 66</td> i hoping keep single line, get:

as can see, flag , telephone number in separate lines. working in between numbers of telephone number, not between flag , telephone number.
how can make sure no line-break @ introduced renderer?
there several ways prevent line breaks in content. using 1 way, , works fine between words, using between empty element , text not have well-defined effect. same apply more logical , more accessible approach use image icon.
the robust alternative use nobr markup, nonstandard universally supported , works when css disabled:
<td><nobr><i class="flag-bfh-es"></i> +34 666 66 66 66</nobr></td> (you can, need not, use instead of spaces in case.)
another way nowrap attribute (deprecated/obsolete, still working fine, except rare quirks):
<td nowrap><i class="flag-bfh-es"></i> +34 666 66 66 66</td> then there’s css way, works in css enabled browsers , needs bit more code:
<style> .nobr { white-space: nowrap } </style> ... <td class=nobr><i class="flag-bfh-es"></i> +34 666 66 66 66</td>
Comments
Post a Comment