We help IT Professionals succeed at work.

We've partnered with Certified Experts, Carl Webster and Richard Faulkner, to bring you two Citrix podcasts. Learn about 2020 trends and get answers to your biggest Citrix questions!Listen Now

x

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

epaynedsm
epaynedsm asked
on
Medium Priority
1,089 Views
Last Modified: 2008-02-20
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?
Comment
Watch Question

CERTIFIED EXPERT
Expert of the Year 2004
Top Expert 2004

Commented:
can i see the page(s)? or can you post the code here?
CERTIFIED EXPERT
Commented:
Have you tried the CSS nowrap property around the phone number?
i.e.
<span style="white-space:nowrap">1-800-555-100</span>

Not the solution you were looking for? Getting a personalized solution is easy.

Ask the Experts

Author

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.

Author

Commented:
Ah... that is it, Rouchie. Thank you so much!
Access more of Experts Exchange with a free account
Thanks for using Experts Exchange.

Create a free account to continue.

Limited access with a free account allows you to:

  • View three pieces of content (articles, solutions, posts, and videos)
  • Ask the experts questions (counted toward content limit)
  • Customize your dashboard and profile

*This site is protected by reCAPTCHA and the Google Privacy Policy and Terms of Service apply.

OR

Please enter a first name

Please enter a last name

8+ characters (letters, numbers, and a symbol)

By clicking, you agree to the Terms of Use and Privacy Policy.