Re: CSS and Eccentric Poems.

Gayle Kidder writes:
 > Charles Peyton Taylor wrote:
 > 
 > > But isn't it planned to add a "style' attribute
 > > to all HTML elements?
 > > 
 > > so one could do this:
 > > 
 > > <P style="margin=5em"> Oh, happy blue dog </p>
 > > <P style="margin=10em"> your ceasless wanderings inspire
 > > Painters</p>
 > > 
 > > and probably a lot more.
 > 
 > 
 > Of course, that assumes you want the extra line spacing that <P> gives
 > you. If not, you have to resort to something like this (which does just
 > what it's supposed to in NSb5):

Actually, Charles' example would work just fine. The `extra line
spacing' is under the control of the style sheet. A style sheet that
emulates Netscape would indeed have

    P { margin-top: 1em },

but if the style sheet had

    P { margin-top: 0em } 

instead, there wouldn't be any extra space between paragraphs.


 > <P>in Just-<br>
 > spring<SPACER TYPE="horizontal" SIZE=70> when the world is mud-<BR>
 > luscious the little<br>
 > lame baloonman
 > 
 > <P>whistles<SPACER TYPE="horizontal" SIZE=50>far<SPACER
 > TYPE="horizontal" SIZE=50>and wee

This spacing is indeed too irregular for CSS1. Some sort of mark-up
has to be in the HTML; a <SPAN> seems logical, but a <BR> would work
as well, and is shorter to type:-)

    <style>
    br.gap1 { display: inline; width: 7em }
    br.gap2 { display: inline; width: 5em }
    </style>

    <p>in Just-<br>
    spring<br class=gap1>when the world is mud-<br>
    luscious the little<br>
    lame baloonman

    <p>whistles<br class=gap2>far<br class=gap2>and wee

I also replaced the 50px by 5em and the 70px by 7em. Pixels is not
really what you want here. I suspect 5em is closer to the author's
intention (but one would have to check the original to be sure).

 > I admit SPACER is pretty clunky in there, but if anyone can tell me how
 > to do that with a style sheet I'm all ears.

I bet DSSSL can do it without any SPACER or BR tags in the
document. Though the resulting style sheet might well be longer than
the poem itself...


Bert
-- 
  Bert Bos                                ( W 3 C ) http://www.w3.org/
  http://www.w3.org/pub/WWW/People/Bos/                      INRIA/W3C
  bert@w3.org                             2004 Rt des Lucioles / BP 93
  +33 93 65 77 71                 06902 Sophia Antipolis Cedex, France

Received on Tuesday, 2 July 1996 17:38:36 UTC