The Artima Developer Community
Sponsored Link

Agile Buzz Forum
HTML and Word Wrapping

0 replies on 1 page.

Welcome Guest
  Sign In

Go back to the topic listing  Back to Topic List Click to reply to this topic  Reply to this Topic Click to search messages in this forum  Search Forum Click for a threaded view of the topic  Threaded View   
Previous Topic   Next Topic
Flat View: This topic has 0 replies on 1 page
James Robertson

Posts: 29924
Nickname: jarober61
Registered: Jun, 2003

David Buck, Smalltalker at large
HTML and Word Wrapping Posted: Feb 14, 2004 7:42 PM
Reply to this message Reply

This post originated from an RSS feed registered with Agile Buzz by James Robertson.
Original Post: HTML and Word Wrapping
Feed Title: Michael Lucas-Smith
Feed URL: http://www.michaellucassmith.com/site.atom
Feed Description: Smalltalk and my misinterpretations of life
Latest Agile Buzz Posts
Latest Agile Buzz Posts by James Robertson
Latest Posts From Michael Lucas-Smith

Advertisement

Here's an interesting complaint from James about the way HTML handles long bits of text. I'll just clear up James's misunderstanding of what technology is to blame.

James wiggles his accusing finger at HTML and CSS. He's half right. It's the HTML spec that specifies that if a word does not fit on the line, it will not be broken up (like any sane word processor would). This means the box that contains the word must /grow/ to hold the word.

Why in gods name did they decide to do this? - well, because they couldn't identify a nice way to specify where a word should be broken if it does not fit on the line its on.

So what's this got to do with CSS? .. or XML? .. not much actually. But it did highlight to me that CSS can be the answer. One property that can be specified in CSS is white-space. It can be normal, nowrap or pre. 'nowrap' as you can imagine forces things not to wrap even if there is whitespace there to wrap with.

It's not a huge stretch of the imagination to add letterwrap to allow words to be broken up by their letters.

In WithStyle we've followed the XHTML specification for dealing with breaking up words (namely, don't do it) but since we're not only doing XHTML, there's no reason we couldn't have other XML doing letter breaking. If we were to do it, we'd favour it being done by specifying a CSS attribute.

Given the obvious value in doing this, this is one blog entry I'll be flagging for myself so I can go back and actually implement it later. An obvious advantage for having a CSS attribute supply it is that you can use this new CSS setting in a regular web browser and they will happily ignore it (and happily give you long-word-syndrome once more).

Read: HTML and Word Wrapping

Topic: Re: Meeting Agenda Detection Previous Topic   Next Topic Topic: Coming up - new site L&DF

Sponsored Links



Google
  Web Artima.com   

Copyright © 1996-2019 Artima, Inc. All Rights Reserved. - Privacy Policy - Terms of Use