# HTM-046: fixed layout without viewport, how to fix it

Source: https://epubcc.com/epubcheck/htm-046/ (updated 2026-11-04)

EPUBCheck HTM-046 is an error message: “Fixed layout document has no "viewport" meta element.” A fixed-layout XHTML document has no viewport meta element, so reading apps do not know its page size. In fixed layout, the width and height in the viewport define each page's coordinate space; without them the page cannot be laid out as designed.

- Official message (EPUBCheck 5.4.0): Fixed layout document has no "viewport" meta element.
- Default severity: Error

## Typical causes

- Fixed-layout pages written without the viewport declaration.
- A book declared as pre-paginated in the package document whose chapters were written as reflowable text.

## How to fix it

1. Add a viewport in the head of each fixed-layout page with its width and height in pixels, for example <meta name="viewport" content="width=1200, height=1600"/>.
2. Use the size the page was designed for (often the pixel size of its background image).
3. If the book is not meant to be fixed layout, remove rendition:layout "pre-paginated" from the package document instead.
4. Rebuild the EPUB and run EPUBCheck again to confirm the message is gone.

## When it's not this

If the page is SVG rather than XHTML, the missing size is a viewBox and the message is HTM-048.

## Sources

- EPUB 3.3, §8.2.2.6 Content document dimensions: https://www.w3.org/TR/epub-33/#sec-fxl-content-dimensions (read 2026-11-04)

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