MudGuard: Probleme bei application/xhtml+xml in Firefox

Beitrag lesen

Hi,

Und der body ist natürlich nur so hoch wie sein Inhalt.

Das mag stimmen, aber dennoch breiten Browser beim body-Element Hintergrundfarben- und grafiken auf den gesamten Viewport aus, so wie es in der text/html-Variante zu sehen ist. Firefox scheint dies in der appliation/xhtml+xml-Variante zu verwerfen.

http://www.w3.org/TR/CSS21/colors.html#q2 sagt:

The background of the root element becomes the background of the canvas and covers the entire canvas, anchored at the same point as it would be if it was painted only for the root element itself. The root element does not paint this background again.

Root element ist das html-Element. Darüber dürfte ja wohl Einigkeit bestehen.
Der Hintergrund des root-Elements (i.e. des html-Elements) wird auf den ganzen Canvas ausgedehnt.
Da Mo hier nichts angegeben ist, wird die Fensterhintergrundfarbe durch den default-Wert für background-color (transparent) "überdeckt".
Sprich: Das html-Element hat also die Fensterhintergrundfarbe als Hintergrund.

Weiter im zitierten Text.

For HTML documents, however, we recommend that authors specify the background for the BODY element rather than the HTML element. For HTML documents whose root HTML element has computed values of 'transparent' for 'background-color' and 'none' for 'background-image', user agents must instead use the computed value of those properties from that HTML element's first BODY element child when painting backgrounds for the canvas, and must not paint a background for that BODY element.

Bei HTML-Dokumenten soll also der body-Hintergrund anstelle des html-Hintergrundes benutzt werden.
Aber jetzt kommt der entscheidende Satz:

This does not apply to XHTML documents.

Das Dokument ist laut
<?xml version="1.0" encoding="iso-8859-1"?><!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
    "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
und auch aufgrund des content-types application/xhtml+xml ein XHTML-Dokument.
Der zweite von mir zitierte Absatz gilt also _nicht_.

cu,
Andreas

--
Warum nennt sich Andreas hier MudGuard?
Schreinerei Waechter
O o ostern ...
Fachfragen unaufgefordert per E-Mail halte ich für unverschämt und werde entsprechende E-Mails nicht beantworten. Für Fachfragen ist das Forum da.