Skip to content
EPUBCheck · Stylesheets

EPUBCheck CSS-006: CSS fixed positioning

Updated:

EPUBCheck CSS-006 is a usage message: “CSS selector specifies fixed position.” A CSS rule uses position: fixed, which reading apps handle inconsistently in paginated text. It is a usage note, not an error: the element may stay on screen, disappear or overlap the text depending on the app.

The official message

CSS selector specifies fixed position.

Default severity
Usage. Informative only and hidden by default: it appears when EPUBCheck runs with -u (--usage). It does not make the EPUB invalid.
EPUBCheck version
5.4.0

Typical causes

  • Styles copied from a website, such as fixed headers, footers or navigation bars.
  • Fixed positioning used to place a page number or logo on every screen.

How to fix it

  1. Open the file EPUBCheck names (the message gives the path, line and column) in a text or EPUB editor such as Sigil, or unzip the EPUB and open it there.
  2. Remove position: fixed or replace it with normal flow (position: static or relative).
  3. If the element was web navigation, remove it from the book: reading apps provide their own.
  4. Rebuild the EPUB and run EPUBCheck again to confirm the message is gone.

When it's not this

If the property is direction or unicode-bidi, it is forbidden outright and reported as CSS-001.

Terms used here

Other CSS messages

  • CSS-005 Conflicting alternate style tags found: ….
  • CSS-007 Font-face reference "…" refers to non-standard font type "…".
  • CSS-004 CSS documents must be encoded in UTF-8, detected …;
  • CSS-008 An error occurred while parsing the CSS: ….
  • CSS-003 CSS document is encoded in UTF-16. It should be encoded in UTF-8 instead.
  • CSS-002 Empty or NULL reference found.

Sources

Message text and severity from EPUBCheck 5.4.0 (W3C, BSD-3-Clause). Explanation by EpubCC.

FAQ

What does EPUBCheck CSS-006 mean?

EPUBCheck CSS-006 is a usage message: “CSS selector specifies fixed position.” A CSS rule uses position: fixed, which reading apps handle inconsistently in paginated text. It is a usage note, not an error: the element may stay on screen, disappear or overlap the text depending on the app.

Is CSS-006 an error?

CSS-006 is reported as usage by default. Informative only and hidden by default: it appears when EPUBCheck runs with -u (--usage). It does not make the EPUB invalid.