Swatch:poetry page

poetry page swatch rule name: .poetry_page

author: tatwell

added: 1 Dec 2006

I designed this class for displaying poems. It uses pre-wrap rules to allow you to display line-break without the &lt;br /&gt; tags and format the page more like you would using a word processor.

It actually requires 4 class settings (for page container, text, title, and author)

Declaration block
 /* page container */ .poetry_page { width:360px; margin:10px auto; padding:3.6em 4em 4em; background:#fcf9f6; color:#1f1616; border:1px #6f6666 outset; font-family:"Palatino Linotype", "Book Antiqua", Palatino, serif; font-size:14px; }

/* text */ .poetry_page .text { margin-top:.4em; line-height:1.8em; white-space: pre-wrap; /* css-3 */ white-space: -moz-pre-wrap; /* Mozilla, since 1999 */ white-space: -pre-wrap; /* Opera 4-6 */ white-space: -o-pre-wrap; /* Opera 7 */ white-space: pre; word-wrap: break-word; /* Internet Explorer 5.5+ */ overflow-x:hidden; }

/* title */ .poetry_page .title { margin:0 0 .6em; font-style:italic; font-size:1.6em; }

/* author */ .poetry_page .author { margin:0 0 0 1em; font-size:1.2em; }

Inline
 /* page */ style="width:360px; margin:10px auto; padding:3.6em 4em 4em; background:#fcf9f6; color:#1f1616; border:1px #6f6666 outset; font-family:'Palatino Linotype', Book Antiqua, Palatino, serif; font-size:14px;"

/* text */ style="margin-top:.4em; line-height:1.8em; white-space: pre-wrap; white-space: -moz-pre-wrap; white-space: -pre-wrap; white-space: -o-pre-wrap; white-space: pre; word-wrap: break-word; overflow-x:hidden;"

Sample
 The leaves fall early this autumn, in wind. The paired butterflies are already yellow with August Over the grass in the west garden— They hurt me. I grow older. If you are coming down through the narrows of the river, Please let me know beforehand, And I will come out to meet you, As far as Cho-fu-Sa.

from "The River-Merchant’s Wife: A Letter" by Ezra Pound