Welcome to the MacNN Forums.

If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

You are here: MacNN Forums > Software - Troubleshooting and Discussion > Developer Center > Discretionary Line Breaks

Discretionary Line Breaks
Thread Tools
Mac Elite
Join Date: Nov 2003
Location: Rockville, MD
Status: Offline
Reply With Quote
Apr 6, 2005, 07:08 PM
 
Well, at some point they deprecated the <nobr> and <wbr> tags, leaving us with no apparent means of indicating in HTML that "a line can break here if necessary". Are there any other approaches/solutions?
     
Grizzled Veteran
Join Date: Jun 2001
Location: Melbourne, Australia
Status: Offline
Reply With Quote
Apr 6, 2005, 08:04 PM
 
Originally posted by selowitch:
Well, at some point they deprecated the <nobr> and <wbr> tags, leaving us with no apparent means of indicating in HTML that "a line can break here if necessary". Are there any other approaches/solutions?
I'd never seen these tags until now! I'm glad they're deprecated - it would create a huge mess in WYSIWYG editors and more of a mess for the poor old sods who need to maintain a lot of websites on the run.

It's now quite easily handled by CSS:-

< p style="white-space: nowrap" >Your non-breaking text< /p >

It will, however, respect < br/ > tags if you want to manually break your text (or so the spec says anyway!)

You can also dispense with < pre > tags, as the white-space property also accepts the 'pre' value.
Computer thez nohhh...
     
Clinically Insane
Join Date: Nov 1999
Status: Offline
Reply With Quote
Apr 7, 2005, 05:50 AM
 
They were never deprecated, because they were never standard.
You are in Soviet Russia. It is dark. Grue is likely to be eaten by YOU!
     
Professional Poster
Join Date: Jan 2003
Status: Offline
Reply With Quote
Apr 7, 2005, 06:00 AM
 
Originally posted by selowitch:
Well, at some point they deprecated the <nobr> and <wbr> tags, leaving us with no apparent means of indicating in HTML that "a line can break here if necessary". Are there any other approaches/solutions?
Is this similar to the soft-hyphenation issue that I posted about earlier?

http://forums.macnn.com/showthread.p...ft+hyphenation
     
Mac Elite
Join Date: Nov 2003
Location: Rockville, MD
Status: Offline
Reply With Quote
Apr 7, 2005, 09:14 AM
 
Originally posted by f1000:
Is this similar to the soft-hyphenation issue that I posted about earlier?

http://forums.macnn.com/showthread.p...ft+hyphenation
Similar, yes. Anybody who does a lot of typesetting/typography is likely to be familiar with discretionary line breaks and soft hyphenation:
  • a discretionary line break is usually placed where another rule precludes hyphenation for the surrounding words, but says "it's okay for the browser [or other text-displaying program] to break the line here if it is needed."
  • a soft (or discretionary) hyphen is similar except it refers to breaking up words into particles by inserting a hyphen when necessary.
(Last edited by selowitch; Apr 11, 2005 at 01:51 PM. )
     
Professional Poster
Join Date: Jan 2003
Status: Offline
Reply With Quote
Apr 7, 2005, 09:35 AM
 
Got it.
     
Mac Elite
Join Date: Nov 2003
Location: Rockville, MD
Status: Offline
Reply With Quote
Apr 11, 2005, 01:52 PM
 
Code:
Originally posted by Simon Mundy: <p style="white-space: nowrap">Your non-breaking text</p>
And if I want to enable wrapping, is it as follows:
Code:
Originally posted by Simon Mundy: <p style="white-space: wrap">Your breaking text</p>
?
     
   
Thread Tools
Forum Links
Forum Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts
BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On
Top
Privacy Policy
All times are GMT -5. The time now is 07:24 PM.
All contents of these forums © 1995-2011 MacNN. All rights reserved.
Branding + Design: www.gesamtbild.com
vBulletin v.3.8.7 © 2000-2011, Jelsoft Enterprises Ltd., Content Relevant URLs by vBSEO 3.3.2