# EPUBCheck CSS-005: conflicting style tags, how to fix it

Source: https://epubcc.com/epubcheck/css-005/ (updated 2026-11-04)

EPUBCheck CSS-005 is a usage message: “Conflicting alternate style tags found: ….” A link to a stylesheet carries alternate style tags that contradict each other. Alternate style tags are class names on link elements (horizontal or vertical, day or night) that tell a reading app when to use each stylesheet, and EPUBCheck lists the conflicting ones.

- Official message (EPUBCheck 5.4.0): Conflicting alternate style tags found: %1$s.
- Default severity: Usage

## Typical causes

- One link element tagged both day and night, or both horizontal and vertical.
- Class lists merged from two templates without checking them.

## 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. Keep one tag of each pair on each link element, for example class="night".
3. If you need styles for both cases, use two link elements, each with its own tag and title.
4. Rebuild the EPUB and run EPUBCheck again to confirm the message is gone.

## When it's not this

If an alternate style sheet simply has no title, the message is CSS-015.

## Sources

- EPUBCheck 5.4.0 message texts (MessageBundle.properties, w3c/epubcheck on GitHub): https://github.com/w3c/epubcheck/blob/v5.4.0/src/main/resources/com/adobe/epubcheck/messages/MessageBundle.properties (read 2026-11-04)

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