Adriano: Fehler bei FF

Beitrag lesen

Hi,

Ich hab eben bei 'margin' die folgende Zeile gelesen:
Initial: not defined for shorthand properties

damit gelten die Default-Werte von margin-left et.al., welche 0 betragen. Verzeih bitte meine Verallgemeinerung in meiner vorhergegangenen Antwort.

  • If none of the properties are 'auto', the value of 'margin-right' will be assigned 'auto'.

Es widerspricht sich einfach mit folgende Aussage:
"If four length values are specified they apply to top, right, bottom and left respectively. If there is only one value, it applies to all sides, if there are two or three, the missing values are taken from the opposite side"
(http://www.w3.org/TR/REC-CSS1#margin)

Wenn default-margin 0 ist, sollten alle 0 sein. Ist aber nicht der Fall.

Da es nicht möglich ist, dass es 0 ist, da width die ganze Breite benutzen soll, sollte margin-left den gleichen Wert bekommen wie margin-right.

Da steht übrigens nichts davon, dass margin-left verändert würde.

Und zusätzlich gilt: "if both 'margin-left' and 'margin-right' are 'auto', they will be set to equal values. This will center the element inside its parent"

Ja. Dieser Fall ist nicht gegeben; margin-left steht auf 0.

Cheatah

Vielleicht kann ich zu wenig Englisch...
(http://www.w3.org/TR/REC-CSS1#text-align)
Example:
DIV.center { text-align: center }
Since 'text-align' inherits, all block-level elements inside the 'DIV' element with 'CLASS=center' will be centered. Note that alignments are relative to the width of the element, not the canvas. If 'justify' is not supported, the UA will supply a replacement. Typically, this will be 'left' for western languages.

Für mich sind "all block-level elements" auch Tabellen.