Hi,
Der WDG-CSS-Validator meldet mir gerade folgende Warnung:
Warning: The margin property does not apply to elements with position value absolute.
Stimmt das denn? In der Specification konnte ich jetzt auf die Schnelle nichts dergleichen entdecken.
Das ergibt sich eigentlich eher implizit.
Aus CSS 2.1, Beschreibung von top:
This property specifies how far an absolutely positioned box's top margin edge is offset below the top edge of the box's containing block. For relatively positioned boxes, the offset is with respect to the top edges of the box itself (i.e., the box is given a position in the normal flow, then offset from that position according to these properties). Note: For absolutely positioned elements whose containing block is based on a block-level element, this property is an offset from the padding edge of that element.
Analog für die anderen 3.
Die Positionierung bezieht sich also (meist) auf die padding-edge.
Ob da außenrum noch ein margin liegt (der keinen Hintergrund hat, also "darunter"-liegende Elemente nicht verdecken kann), ist im Prinzip egal.
Und auf Geschwister-Elemente hat das absolut positionierte Element eh keinen Einfluß, es ist ja aus dem (Ein-) Fluß genommen.
cu,
Andreas
Warum nennt sich Andreas hier MudGuard?
Schreinerei Waechter
Fachfragen per E-Mail halte ich für unverschämt und werde entsprechende E-Mails nicht beantworten. Für Fachfragen ist das Forum da.