Skip to content
Text Rotation

Rotating text has practical uses — sidebar labels, book spines, watermarks, and decorative headings. Three distinct techniques are available: CSS transform, CSS writing-mode, and SVG presentation attributes.


CSS transform — any angle

transform: rotate() on an inline or block element. Negative values rotate anti-clockwise.

−45° −30° −15° +15° +30° +45°

CSS writing-mode — vertical text

writing-mode: vertical-rl and writing-mode: vertical-lr flow text top-to-bottom without using transform at all. This is the correct approach for sidebar labels and book spine text.

vertical-rl

Village Gazette · Spring Edition

vertical-lr

Village Gazette · Spring Edition

vertical-rl + rotate(180deg)

Village Gazette · Spring Edition

text-orientation — upright characters in vertical flow

text-orientation: upright keeps each letter facing forward within a vertical flow, rather than rotating the whole string.

Default (mixed)

Café 咖啡

text-orientation: upright

Café 咖啡

Practical — book spine label

The Recipe Book Margaret Ellis
A Year in Provence Travel Journals

Practical — sidebar label

Tip of the Week
When making jam, add the juice of half a lemon to help the fruit set. The natural pectin in citrus peel works particularly well with strawberries and raspberries.

SVG text rotation — no CSS

SVG <text> supports transform="rotate(angle)" as a presentation attribute. No stylesheet required.

Vertical Diagonal Upright Slanted

Practical — watermark

Rotated text positioned behind content using position: relative and position: absolute.

Draft

The summer menu changes every two weeks, depending on what is available at the market that morning. We work with the same three or four local growers we have always worked with, and the kitchen adapts around what they bring.

© 2026 Docizr. All rights reserved.