non breaking dash

Discussion in 'HTML' started by =?iso-8859-15?Q?Jens_M=FCller?=, Sep 6, 2006.

  1. Hello,

    I want to prevent that a word like "Company-Name" is broken at the end
    of the line at the "-".
    With spaces, I would use "nbsp", but how to do this with a dash?

    Thanks!
     
    =?iso-8859-15?Q?Jens_M=FCller?=, Sep 6, 2006
    #1
    1. Advertising

  2. =?iso-8859-15?Q?Jens_M=FCller?=

    Bobbo Guest

    Jens Müller wrote:
    > I want to prevent that a word like "Company-Name" is broken at the end
    > of the line at the "-".


    Try ‑

    e.g.
    Badger‑Botherer

    Although that may have some restrictions based on what encoding you're
    using - can anyone else advise?
     
    Bobbo, Sep 6, 2006
    #2
    1. Advertising

  3. =?iso-8859-15?Q?Jens_M=FCller?=

    Ed Mullen Guest

    Bobbo wrote:
    > Jens Müller wrote:
    >> I want to prevent that a word like "Company-Name" is broken at the end
    >> of the line at the "-".

    >
    > Try ‑
    >
    > e.g.
    > Badger‑Botherer
    >
    > Although that may have some restrictions based on what encoding you're
    > using - can anyone else advise?
    >


    http://www.google.com/search?query=non breaking hyphen html&num=50

    --
    Ed Mullen
    http://edmullen.net
    http://mozilla.edmullen.net
    http://abington.edmullen.net
    All I ask is a chance to prove that money can't make me happy.
     
    Ed Mullen, Sep 6, 2006
    #3
  4. > Try ‑

    Thanks!
     
    =?iso-8859-1?Q?Jens_M=FCller?=, Sep 7, 2006
    #4
  5. Bobbo <> scripsit:

    > Try ‑


    That's non-breaking hyphen. It's probably what the OP really _meant_,
    though. But it doesn't really work, due to browser limitations.

    The practical approach is to use the nonstandard <nobr> markup around the
    string that should not be broken across lines, as in
    <nobr>Company-Name</nobr>
    For more info, see
    http://www.cs.tut.fi/~jkorpela/html/nobr.html

    > Although that may have some restrictions based on what encoding you're
    > using - can anyone else advise?


    The encoding has nothing to do with that. The meaning of ‑ is
    completely independent on the encoding of the page.

    --
    Jukka K. Korpela ("Yucca")
    http://www.cs.tut.fi/~jkorpela/
     
    Jukka K. Korpela, Sep 7, 2006
    #5
  6. =?iso-8859-15?Q?Jens_M=FCller?=

    Bobbo Guest

    Jukka K. Korpela wrote:

    > The practical approach is to use the nonstandard <nobr> markup around the
    > string that should not be broken across lines, as in
    > <nobr>Company-Name</nobr>
    > For more info, see
    > http://www.cs.tut.fi/~jkorpela/html/nobr.html
    >
    > The encoding has nothing to do with that. The meaning of ‑ is
    > completely independent on the encoding of the page.


    Thanks for pointing that out, that's more useful than a list of search
    results.
     
    Bobbo, Sep 11, 2006
    #6
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Amy
    Replies:
    0
    Views:
    513
  2. Replies:
    1
    Views:
    427
    Jukka K. Korpela
    Dec 10, 2005
  3. Fredrik Lundh
    Replies:
    0
    Views:
    619
    Fredrik Lundh
    Nov 20, 2005
  4. Fredrik Lundh
    Replies:
    0
    Views:
    472
    Fredrik Lundh
    Nov 21, 2005
  5. Rigour
    Replies:
    4
    Views:
    1,402
    Neredbojias
    Nov 17, 2009
Loading...

Share This Page