Zulema,
First and foremost, I am a designer, so please take this advice from someone who understands really beautiful typography, but also understands when the web won't comply.
This is definitely a case of "don't bother". For starters, you're typesetting those orphans and widows on YOUR screen, with YOUR fonts, with YOUR resolution, with YOUR browser. The problem is, what looks "perfect" on your screen will be an absolute mess on someone else's, because your hard-coded <br />'s will more than likely appear mid-line on someone else's system.
This is an unavoidable reality which you need to accept and move on: <br />'s are doing WAY more harm than good - they're not a typesetting tool, they're designed to be used in things like poetry, where a break in the flow of the text is intended.
Most typographic resources discuss orphans and widows in reference to lines which are separated from the rest of their paragraph over a page break or column break. However in this case, I assume you mean single words that are pushed down to a line all by themselves, like the last word in a paragraph, right?
Assuming this is what you want to prevent, then the quickest "hack" I can think of is to use a no break space ( ) inbetween the last two words in each paragraph, forcing them to appear on the same line. However this isn't much of a solution.
As you no doubt know, the problem with this is that sometimes forcing the 2nd-last word down as well will cause the preceding line to appear quite short, in which case you'd bump other words around until the paragraph was well-balanced. This is simply not possible with HTML, due to the lack of control you have over the user's environment and settings, and the fact that you can't *visually* look at the paragraph on everyone's screen and decide what's best -- it's out of your control.
Modern DTP programs like InDesign currently make visual corrections to the line breaks in a paragraph automatically, so my suggestion here is to simply leave it alone, and let the browser's own line-wrapping mechanisms decide where to wrap. Over time, as browsers improve, it's my guess that they will handle line-wrapping, orphans, widows, etc, much like InDesign does, but until then, your <br />'s are definitely doing more harm than good.
On 28/05/2004, at 7:39 AM, !!blue wrote:
Hi,
Is there a way to eliminate widows/orphans in paragraphs? Not when the html page
is printed out, but when viewed in a browser. I wanted to know if anyone's run
into this and knows how to fix/kludge/hack? (preferably something that would
validate of course)
If not, I'll keep on adding <br />'s where necessary as I've done in the past.
=:-O the horror!!
thanks, Zulema
--- Justin French http://indent.com.au
*****************************************************
The discussion list for http://webstandardsgroup.org/
See http://webstandardsgroup.org/mail/guidelines.cfm
for some hints on posting to the list & getting help
*****************************************************
