MudGuard: Icon über Image

Beitrag lesen

Hi,

Nach meinem Kenntnisstand trifft das nur für absolute und fixed zu.

Nach meinem Kenntnisstand gilt das für alle Werte außer static.

Gucken wir doch mal nach:

CSS 2.1 Position sagt:

static

The box is a normal box, laid out according to the normal flow. The 'top', 'right', 'bottom', and 'left' properties do not apply. 

relative

The box's position is calculated according to the normal flow (this is called the position in 

normal flow). Then the box is offset relative to its normal position. When a box B is relatively positioned, the position of the following box is calculated as though B were not offset. The effect of 'position:relative' on table-row-group, table-header-group, table-footer-group, table-row, table-column-group, table-column, table-cell, and table-caption elements is undefined.

absolute

The box's position (and possibly size) is specified with the 'top', 'right', 'bottom', and 'left' properties. These properties specify offsets with respect to the box's containing block. Absolutely positioned boxes are taken out of the normal flow. This means they have no impact on the layout of later siblings. Also, though absolutely positioned boxes have margins, they do not collapse with any other margins. 

fixed

The box's position is calculated according to the 'absolute' model, but in addition, the box is fixed with respect to some reference. As with the 'absolute' model, the box's margins do not collapse with any other margins. In the case of handheld, projection, screen, tty, and tv media types, the box is fixed with respect to the viewport and does not move when scrolled. In the case of the print media type, the box is rendered on every page, and is fixed with respect to the page box, even if the page is seen through a viewport (in the case of a print-preview, for example). For other media types, the presentation is undefined. Authors may wish to specify 'fixed' in a media-dependent way. For instance, an author may want a box to remain at the top of the viewport on the screen, but not at the top of each printed page. 

Zitatende.

Nochmal rausgezogen:

relative

The box's position is calculated according to the normal flow

Nur bei absolute heißt es "Absolutely positioned boxes are taken out of the normal flow.". Wobei es bei fixed heißt, daß es sich analog absolute verhält.

==> static + relative: im flow, absolute + fixed aus dem flow.

CSS 3 sagt zur Relative:

Once a box has been laid out according to the normal flow or floated, it may be offset relative to this position. ... 

==> relative: ist im flow, aber ggf. verschoben.

cu,
Andreas a/k/a MudGuard