views:

64

answers:

1

In the footer of a flexible-layout website I've noticed that IE tends to line-wrap on parenthesis characters (in a phone number in this case). Is there a visually equivalent non-breaking parenthesis, in a similar vein to non-breaking spaces and non-breaking hyphens, that I can use instead?

+5  A: 

Try this:

.phone{
    white-space: nowrap;
}

<p>Call Customer Support at <span class="phone">+34 (947) 12 34 56 78</span> for further enquiries.</p>

You can do many other things (from <nobr> tag to certain Unicode chars) but they aren't as cross-browser as this.

Álvaro G. Vicario
This is a good practical solution, however, I'm specifically looking for a pure html version, for non-css users (accessibility is a priority).
graphicdivine
This is a minor cosmetic issue. Having an line break in the middle of a phone number is not an accessibility issue.
David Dorward
@David Dorward That's not the point I was making. My priority is to provide as similar an experience as possbile without CSS. Also, I disagree, I think it *is* an accessibility barrier.
graphicdivine
You can use `<nobr>` as this answer suggests if you don't want CSS, but I can't think of a single browser alive that doesn't support CSS.
Max Shawabkeh