Skip to content
Glossary

What is CSS in EPUB?

Updated:

EPUB uses ordinary CSS stylesheets for presentation, but reading apps may override fonts, margins and colours, and some properties, such as fixed positioning, are unreliable or not allowed. Good EPUB CSS is short and lets the reader decide.

Why it matters when you convert a PDF to EPUB

A PDF has exact fonts, sizes and positions for every line; copying them into CSS produces an EPUB that fights the reader's settings. A converter should keep only structure-related style (headings, emphasis, block quotes, note sizes) and drop absolute sizes and positions.

Related terms

EPUBCheck messages about this

  • CSS-001 The "…" property must not be included in an EPUB Style Sheet.
  • CSS-006 CSS selector specifies fixed position.
  • CSS-008 An error occurred while parsing the CSS: ….
  • RSC-013 Fragment identifier is used in a reference to a stylesheet resource.
  • CSS-002 Empty or NULL reference found.
  • CSS-003 CSS document is encoded in UTF-16. It should be encoded in UTF-8 instead.
  • CSS-004 CSS documents must be encoded in UTF-8, detected …;
  • CSS-007 Font-face reference "…" refers to non-standard font type "…".

Convert a PDF to EPUB
Convert up to 5 pages free, no account needed.

FAQ

What is CSS in EPUB?

EPUB uses ordinary CSS stylesheets for presentation, but reading apps may override fonts, margins and colours, and some properties, such as fixed positioning, are unreliable or not allowed. Good EPUB CSS is short and lets the reader decide.