 |
 |
Discretionary Line Breaks
|
 |
|
 |
|
Mac Elite
Join Date: Nov 2003
Location: Rockville, MD
Status:
Offline
|
|
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
|
|
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
|
|
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
|
|
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
|
|
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
|
|
Got it. 
|
|
|
| |
|
|
|
 |
|
 |
|
Mac Elite
Join Date: Nov 2003
Location: Rockville, MD
Status:
Offline
|
|
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>
?
|
|
|
| |
|
|
|
 |
 |
|
 |
|
|
|
|
|

|
|
 |
Forum Rules
|
 |
 |
|
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts
|
HTML code is Off
|
|
|
|
|
|
 |
 |
 |
 |
|
 |
|