Standard CSS for Epub Files

From MobileRead
Jump to: navigation, search

This page contains some standard CSS which is especially useful for ePub output. In general, this CSS works cross-platform and across devices. Listed are some typical formatting situations you will find in ebook production and the "standard" way to get things done. If there are device-specific hacks, they probably should be listed on the Device pages. Note that Kindle/Mobi format is different from ePub, and what is standard for Kindle may not apply to these CSS examples.

Matt Harrison has put together a Epub CSS Starter Kit which includes a generic base css for epub files.

See also: Table listing CSS properties and support on devices:

Contents

[edit] Images

[edit] Ebook Covers

[edit] Captions

[edit] Hyperlinks

[edit] Widows and Orphans

[edit] Centering and Justification

[edit] Hyphenation

.h2.title, h1.title, h3.title { -webkit-hyphens: none !important; adobe-hyphenate: none; -moz-hyphens: none; }

[edit] TOC

[edit] Title/Copyright Page

[edit] For more examples

Personal tools
Namespaces
Variants
Actions
Navigation
MobileRead Networks
Toolbox
Advertisement