Back to Resources
Formatting Guides 8 min read September 29, 2026

How to Format Poetry for Kindle & EPUB: CSS Code for Stanza Integrity & Hanging Indents

Preserve poetic rhythm on digital e-readers. Discover exact CSS implementations for hanging indents, non-breaking spaces, and fixed vs reflowable EPUB formatting.

E

Eleanor Vance

Head of Digital Production

"Formatting poetry for digital e-readers is notoriously challenging. Standard novels use reflowable text that expands and contracts effortlessly across different screen sizes and font settings. In poetry, line breaks, indentations, caesuras, and stanza spacings are integral to the artistic meaning and rhythmic meter of the poem. When a reader enlarges the font size on a smartphone or Kindle Paperwhite, an unformatted poetic line will wrap awkwardly, destroying the poem's cadence. This guide provides exact CSS styling rules to preserve poetic integrity across all digital devices."

Core Key Takeaways

  • The Inherent Conflict: Reflowable Text vs. Poetic Architecture
  • The Hanging Indent Solution (The Gold Standard CSS)
  • Preserving Stanza Separation and Whitespace
  • Concrete, Visual, and Shape Poetry: When Fixed-Layout Is Mandatory
  • Preserving Indented Lines and Caesuras with Non-Breaking Spaces

1. The Inherent Conflict: Reflowable Text vs. Poetic Architecture

Digital e-readers do not display static pages; they render responsive HTML and CSS. When a line of poetry exceeds the width of an e-reader screen, the device wraps the overflowing words to the next line. If formatted incorrectly, the reader cannot tell whether the wrapped phrase is a continuation of the same line or a deliberate new line written by the poet.

  • Meter Destruction: Accidental line wrapping breaks iambic pentameter, haiku, and free-verse visual structures.
  • Stanza Collapse: Word processors often convert extra returns into irregular margin collapses during automated EPUB conversion.
  • Device Diversity: A poem that looks sublime on a 10-inch iPad will completely shatter on a 4.7-inch iPhone screen unless responsive CSS is applied.

2. The Hanging Indent Solution (The Gold Standard CSS)

The universal publishing standard for digital poetry is the hanging indent (also known as an outdent). When a long poetic line must wrap, the overflow text wraps with an indented margin, signaling to the reader that it is an unbroken continuation of the preceding line.

  • CSS Implementation: .poem-line { padding-left: 1.5em; text-indent: -1.5em; margin-bottom: 0.2em; text-align: left; }
  • How It Works: The negative text-indent pulls the first line out to the normal margin, while the padding-left indents any wrapped overflow words by 1.5em.
  • Visual Distinction: The reader immediately recognizes wrapped verses without cognitive confusion.

3. Preserving Stanza Separation and Whitespace

Never use repeated empty paragraph tags (<p>&nbsp;</p>) or multiple hard carriage returns to create stanza breaks. E-reader rendering engines strip out blank paragraphs to optimize screen space.

  • Stanza Container CSS: Wrap each stanza in a container div: .stanza { margin-bottom: 1.5em; page-break-inside: avoid; }
  • Page-Break Integrity: Applying 'page-break-inside: avoid' instructs the e-reader to keep short stanzas together on a single screen whenever possible.
  • Line Break Tags: Use soft breaks (<br />) between lines within a stanza rather than closing and opening new paragraph tags.

4. Concrete, Visual, and Shape Poetry: When Fixed-Layout Is Mandatory

While traditional lyric poetry thrives in responsive reflowable EPUBs using hanging indents, visual or concrete poetry (where the physical arrangement of words creates a visual silhouette, spiral, or geometric shape) cannot be reflowed.

  • Fixed-Layout EPUB (FXL): Freezes text, typography, and page geometry exactly like a PDF, ensuring visual poems never shift.
  • Trade-Offs of FXL: Fixed-layout eBooks cannot be read on basic e-ink Kindles and incur higher delivery fees due to file size.
  • Hybrid Approach: For primarily traditional collections with 1 or 2 visual poems, render the visual poems as high-resolution SVG or 300 DPI transparent PNG images with alt text.

5. Preserving Indented Lines and Caesuras with Non-Breaking Spaces

Poets frequently indent specific lines for dialogue, counterpoint, or musical phrasing. Standard HTML collapses multiple consecutive spaces into a single space.

  • Indented Line Classes: Create dedicated CSS helper classes: .indent-1 { padding-left: 3.0em; text-indent: -1.5em; } and .indent-2 { padding-left: 4.5em; text-indent: -1.5em; }
  • Em-Spaces (&emsp;): Use standardized typographical entity codes rather than tapping the spacebar repeatedly.
  • No Justification: Always set poetry body text to 'text-align: left'. Full justification (text-align: justify) stretches words across the line with awkward, jarring gaps.

The Takeaway

Poetry requires meticulous typographical care to ensure the poet's cadence and visual balance survive the digital transition. Golden Ivory Publishing specializes in custom CSS typesetting and dual print-digital layouts for poetry collections.

Ready to Publish?

Bring Your Manuscript to Life with Golden Ivory

Schedule a 1-on-1 publishing consultation to discuss your editorial, formatting, design, and distribution roadmap.