Previous Message
Next Message

laying out poetry

Sent by Andrew Stevens on 14 December 2003 15:03


Hi Miriam,

There is an easy CSS solution to your problem, namely
"font-family:inherit".

So, you should be able to do something like:

<pre style="font-family:inherit;">
  A Poem
Goes
    Here
</pre>

Unfortunately IE doesn't support this.

The most usable CSS solution to your problem would be to use something
like:

<div style="white-space:pre;">
  A Poem
Goes
    Here
</div>

However, this method, of course, looses its spacing when viewed with a
non-CSS enabled device. The support for the above method is fairly
good, but not ideal (IE 5.5+, NN6+, Opera4+, and I'm assuming Safari
as well).

If I were in your place, I would probably put the poems inside a <pre> element
with a defined font, since I would consider font choice part some
poems' content.

Good luck with your site's conversion to CSS.


-- 
 Andrew
http://www.4serendipity.com

MB> The template for each individual poem page uses indent classes to place
MB> lines that are indented various numbers of ems off the left margin of the
MB> block.
MB> example  from  http://sfpoetry.org/kamogawa.html  :
MB>    <span class="indent4">lump of old teakettle brick plastic 
MB> garbage</span><br />
MB>    <span class="indent5">ten feet from the west bank of the River</span><br />
MB>   css:
MB>    .indent4 {margin-left: 4em;}
MB>    .indent5 {margin-left: 5em;}

MB> But the layout of a poem on the page is part of its content, and using this
MB> method means that a reader with CSS turned off, or in lynx for example,
MB> will actually have lost part of the content. (It would all be left aligned,
MB> whether correctly or not.) So I need to change my basic model.

MB> I see in the archives that Mr. Meyer has suggested 'wrapping the entire
MB> poem in a <pre> element'. This seems really elegant in all ways except one:

MB> I do NOT want to dictate fonts to the readers: I want the words comfortably
MB> offered in the reader's preferred and most familiar-looking font style and
MB> size. Without some kind of font styling, at least a font family, the
MB> browsers will offer it up in fixed width. Probably Courier (90% of our
MB> readers use IE).

MB> Is there some way to amend the suggested rule
MB>       pre.poem {font-family: "New Century Schoolbook", Times, TimesNR,
MB>              "Times New Roman", serif;}
MB> so that it calls for "your browser's preferred variable-width font, whether
MB> serif or sans-serif, and I don't care which" ?






______________________________________________________________________
css-discuss [EMAIL-REMOVED]]
http://www.css-discuss.org/mailman/listinfo/css-d
Supported by evolt.org -- http://www.evolt.org/help_support_evolt/
Previous Message
Next Message

Message thread: