• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 735
  • Last Modified:

In html - keep phone number on same line without word wrapping at the hyphen

This is an annoyance; in my web pages, the text of a phone number at the end of a line will wrap at the hyphen, and I like to keep the phone number together. How do I keep the number together on the same line including the hyphens?
0
epaynedsm
Asked:
epaynedsm
  • 2
1 Solution
 
SheharyaarSaahilCommented:
can i see the page(s)? or can you post the code here?
0
 
RouchieCommented:
Have you tried the CSS nowrap property around the phone number?
i.e.
<span style="white-space:nowrap">1-800-555-100</span>
0
 
epaynedsmAuthor Commented:
It happens on any page where the phone number will not fit at the end of a line, so it wraps automatically at the hyphen.
0
 
epaynedsmAuthor Commented:
Ah... that is it, Rouchie. Thank you so much!
0

Featured Post

Free Tool: ZipGrep

ZipGrep is a utility that can list and search zip (.war, .ear, .jar, etc) archives for text patterns, without the need to extract the archive's contents.

One of a set of tools we're offering as a way to say thank you for being a part of the community.

  • 2
Tackle projects and never again get stuck behind a technical roadblock.
Join Now