SitePoint Sponsor

User Tag List

Results 1 to 4 of 4
  1. #1
    SitePoint Member
    Join Date
    Sep 2006
    Posts
    13
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    non breaking hyphens

    Hi

    Does anyone know how to stop non breaking hyphens in CSS please? I've tried white-space: nowrap but that just caused all the text to go across the screen.

    Cheers

    Nigel
    Last edited by leaner; Sep 14, 2006 at 08:57.

  2. #2
    SitePoint Author silver trophybronze trophy

    Join Date
    Nov 2004
    Location
    Ankh-Morpork
    Posts
    12,159
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Hi Nigel, and welcome to SitePoint!

    Browsers are not supposed to wrap lines at hyphens. IE and Opera do, but that is agains the spec. Lines of text may only be wrapped at whitespace characters.

    There is no nowrap value for white-space, but you can try white-space:pre (although that has some side-effects that may be undesirable). There are others, but the support for them is iffy.
    Last edited by AutisticCuckoo; Sep 14, 2006 at 22:25.
    Birnam wood is come to Dunsinane

  3. #3
    In memoriam gold trophysilver trophybronze trophy Dan Schulz's Avatar
    Join Date
    May 2006
    Location
    Aurora, Illinois
    Posts
    15,495
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Ugh, smileys... did you mean white-space: pre; by any chance?

  4. #4
    SitePoint Member
    Join Date
    Sep 2006
    Posts
    13
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    pre

    Hi there

    No pre did not work either. It's a bit of a git really as the client uses it's name thoughout this dynamic site and it has a bloody hyphen in it. So they are constantly having to start the words on a seperate line.

    Cheers

    Nigel


Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •