10.3.7 Absolutely positioned, non-replaced elements

Chapter 10 - Visual formatting model details - 10.3.7 Absolutely positioned, non-replaced elements

Go to the relevant page of the specification.

absolute-non-replaced-width-001 (ahem)
Solving for 'right' on absolutely positioned non-replaced elements
When direction is left-to-right and 'left', 'width' and 'right' are 'auto', the width becomes shrink-to-fit and then solve for 'right'.
absolute-non-replaced-width-002 (ahem)
Solving for 'left' on absolutely positioned non-replaced elements
When direction is right-to-left and 'left', 'width' and 'right' are 'auto', the width becomes shrink-to-fit and then solve for 'left'.
absolute-non-replaced-width-003 (ahem)
Absolutely positioned non-replaced elements with 'margin-left' and 'margin-right' set to 'auto'
When 'left', 'width' and 'right' are not 'auto', set 'margin-left' and 'margin-right' to equal values.
absolute-non-replaced-width-004 (ahem)
Absolutely positioned non-replaced elements when both 'margin-left' and 'margin-right' are set to 'auto' and direction is left-to-right
When direction is 'ltr' and 'left', 'width' and 'right' are not 'auto', solve for 'margin-right' and 'margin-left' to equal values. If this would make 'margin-left' and 'margin-right' negative, then set 'margin-left' to zero and solve for 'margin-right'.
absolute-non-replaced-width-005 (ahem)
Absolutely positioned non-replaced elements when both 'margin-left' and 'margin-right' are set to 'auto' and direction is right-to-left
When direction is 'rtl' and 'left', 'width' and 'right' are not 'auto', solve for 'margin-right' and 'margin-left' to equal values. If this would make 'margin-left' and 'margin-right' negative, then set 'margin-right' to zero and solve for 'margin-left'.
absolute-non-replaced-width-006 (ahem)
Absolutely positioned non-replaced element when only 'margin-right' is 'auto' and direction is left-to-right
When direction is left-to-right and 'left', 'width', 'margin-left' and 'right' are not 'auto', solve for 'margin-right'.
absolute-non-replaced-width-007 (ahem)
Absolutely positioned non-replaced element when only 'margin-left' is 'auto' and direction is right-to-left
When direction is right-to-left and 'left', 'width', 'margin-right' and 'right' are not 'auto', solve for 'margin-left'.
absolute-non-replaced-width-008 (ahem)
Absolutely positioned non-replaced elements with left, width, right and margin-right not auto
If 'left', 'width', 'right' and 'margin-right' are all not 'auto' and 'margin-left' is 'auto', then solve the equation for 'margin-left'.
absolute-non-replaced-width-009 (ahem)
Absolutely positioned non-replaced elements with left, width, right and margin-left not auto
If 'left', 'width', 'right' and 'margin-left' are all not 'auto' and 'margin-right' is 'auto', then solve the equation for 'margin-right'.
absolute-non-replaced-width-010 (ahem)
Solved for 'left' when absolutely positioned non-replaced elements has 'left' and 'width' as 'auto'
When 'left' and 'width' are 'auto' and 'right' is not 'auto', then the width is shrink-to-fit and then solve for 'left'.
absolute-non-replaced-width-011 (ahem)
Absolutely positioned non-replaced elements when 'left' and 'right' are 'auto', 'width' is not 'auto' and 'direction' is left-to-right
When 'direction' is left-to-right and 'left' and 'right' are 'auto' and 'width' is not 'auto', solve for 'right'.
absolute-non-replaced-width-012 (ahem)
Absolutely positioned non-replaced elements when 'left' and 'right' are 'auto', 'width' is not 'auto' and 'direction' is right-to-left
When 'direction' is right-to-left and 'left' and 'right' are 'auto' and 'width' is not 'auto', solve for 'left'.
absolute-non-replaced-width-013 (ahem)
Solved for 'right' when absolutely positioned non-replaced elements has 'right' and 'width' as 'auto'
When 'right' and 'width' are 'auto' and 'left' is not 'auto', then the width is shrink-to-fit and then solve for 'right'.
absolute-non-replaced-width-014 (ahem)
Solved for 'left' when absolutely positioned non-replaced elements has 'right' and 'width' not set to 'auto'
When 'left' is 'auto' and 'width' and 'right' are not 'auto' element solves for 'left'.
absolute-non-replaced-width-015
Solved for 'width' when absolutely positioned non-replaced elements has 'left' and 'right' not set to 'auto'
When 'width' is 'auto' and 'left' and 'right' are not 'auto' element solves for 'width'.
absolute-non-replaced-width-016 (ahem)
Solved for 'right' when absolutely positioned non-replaced elements has 'left' and 'width' not set to 'auto'
When 'right' is 'auto' and 'width' and 'left' are not 'auto' element solves for 'right'.
absolute-non-replaced-width-017 (ahem)
'shrink-to-fit' width of absolutely positioned, non-replaced elements - direction (left-to-right), inline-block and max-width
When direction is left-to-right and 'left' is set to static position and 'width' and 'right' are 'auto', then the used value of 'width' is given by 'shrink-to-fit' width calculation. If 'width' of an inline-block, non-replaced element in normal flow computes to 'auto', then the used value of 'width' is also given by 'shrink-to-fit' width calculation. If 'width' of an inline-block, non-replaced element in normal flow is given by 'shrink-to-fit' width calculation, then such calculated width can be furthermore constrained, reduced by a max-width declaration. If width of an absolutely positioned, non-replaced element resorts to 'shrink-to-fit' width calculation but its own child uses a constrained length resulting from a max-width declaration, then such constrained length will define the preferred width in 'shrink-to-fit' width calculation.
absolute-non-replaced-width-018 (ahem)
'shrink-to-fit' width of absolutely positioned, non-replaced elements - direction (left-to-right), inline-block and max-width
When direction is left-to-right and 'left' is set to static position and 'width' and 'right' are 'auto', then the used value of 'width' is given by 'shrink-to-fit' width calculation. If 'width' of an inline-block, non-replaced element in normal flow computes to 'auto', then the used value of 'width' is also given by 'shrink-to-fit' width calculation. If 'width' of an inline-block, non-replaced element in normal flow is given by 'shrink-to-fit' width calculation, then such calculated width can be furthermore constrained, reduced by a max-width declaration. If width of an absolutely positioned, non-replaced element resorts to shrink-to-fit width calculation but its own child uses a constrained length resulting from a max-width declaration, then such constrained length will define the preferred width in 'shrink-to-fit' width calculation.
absolute-non-replaced-width-019 (ahem)
'shrink-to-fit' width of absolutely positioned, non-replaced elements - direction (left-to-right), float and max-width
When direction is left-to-right and 'left' is set to static position and 'width' and 'right' are 'auto', then the used value of 'width' is given by 'shrink-to-fit' width calculation. If 'width' of an floating, non-replaced element in normal flow computes to 'auto', then the used value of 'width' is also given by 'shrink-to-fit' width calculation. If 'width' of a floating, non-replaced element in normal flow is given by 'shrink-to-fit' width calculation, then such calculated width can be furthermore constrained, reduced by a max-width declaration. If width of an absolutely positioned, non-replaced element resorts to 'shrink-to-fit' width calculation but its own child uses a constrained length resulting from a max-width declaration, then such constrained length will define the preferred width in 'shrink-to-fit' width calculation.
absolute-non-replaced-width-020 (ahem)
'shrink-to-fit' width of absolutely positioned, non-replaced elements - direction (left-to-right), float and max-width
When direction is left-to-right and 'left' is set to static position and 'width' and 'right' are 'auto', then the used value of 'width' is given by 'shrink-to-fit' width calculation. If 'width' of an floating, non-replaced element in normal flow computes to 'auto', then the used value of 'width' is also given by 'shrink-to-fit' width calculation. If 'width' of a floating, non-replaced element in normal flow is given by 'shrink-to-fit' width calculation, then such calculated width can be furthermore constrained, reduced by a max-width declaration. If width of an absolutely positioned, non-replaced element resorts to 'shrink-to-fit' width calculation but its own child uses a constrained length resulting from a max-width declaration, then such constrained length will define the preferred width in 'shrink-to-fit' width calculation.
absolute-non-replaced-width-021 (ahem)
'shrink-to-fit' width of absolutely positioned, non-replaced elements - direction (right-to-left), inline-block and max-width
When direction is right-to-left and 'right' is set to static position and 'width' and 'left' are 'auto', then the used value of 'width' is given by 'shrink-to-fit' width calculation. If 'width' of an inline-block, non-replaced element in normal flow computes to 'auto', then the used value of 'width' is also given by 'shrink-to-fit' width calculation. If 'width' of an inline-block, non-replaced element in normal flow is given by 'shrink-to-fit' width calculation, then such calculated width can be furthermore constrained, reduced by a max-width declaration. If width of an absolutely positioned, non-replaced element resorts to 'shrink-to-fit' width calculation but its own child uses a constrained length resulting from a max-width declaration, then such constrained length will define the preferred width in 'shrink-to-fit' width calculation.
absolute-non-replaced-width-022 (ahem)
'shrink-to-fit' width of absolutely positioned, non-replaced elements - direction (right-to-left), inline-block and max-width
When direction is right-to-left and 'right' is set to static position and 'width' and 'left' are 'auto', then the used value of 'width' is given by 'shrink-to-fit' width calculation. If 'width' of an inline-block, non-replaced element in normal flow computes to 'auto', then the used value of 'width' is also given by 'shrink-to-fit' width calculation. If 'width' of an inline-block, non-replaced element in normal flow is given by 'shrink-to-fit' width calculation, then such calculated width can be furthermore constrained, reduced by a max-width declaration. If width of an absolutely positioned, non-replaced element resorts to 'shrink-to-fit' width calculation but its own child uses a constrained length resulting from a max-width declaration, then such constrained length will define the preferred width in 'shrink-to-fit' width calculation.
absolute-non-replaced-width-023 (ahem)
'shrink-to-fit' width of absolutely positioned, non-replaced elements - direction (right-to-left), float and max-width
When direction is right-to-left and 'right' is set to static position and 'width' and 'left' are 'auto', then the used value of 'width' is given by 'shrink-to-fit' width calculation. If 'width' of an floating, non-replaced element in normal flow computes to 'auto', then the used value of 'width' is also given by 'shrink-to-fit' width calculation. If 'width' of a floating, non-replaced element in normal flow is given by 'shrink-to-fit' width calculation, then such calculated width can be furthermore constrained, reduced by a max-width declaration. If width of an absolutely positioned, non-replaced element resorts to 'shrink-to-fit' width calculation but its own child uses a constrained length resulting from a max-width declaration, then such constrained length will define the preferred width in 'shrink-to-fit' width calculation.
absolute-non-replaced-width-024 (ahem)
'shrink-to-fit' width of absolutely positioned, non-replaced elements - direction (right-to-left), float and max-width
When direction is right-to-left and 'right' is set to static position and 'width' and 'left' are 'auto', then the used value of 'width' is given by 'shrink-to-fit' width calculation. If 'width' of an floating, non-replaced element in normal flow computes to 'auto', then the used value of 'width' is also given by 'shrink-to-fit' width calculation. If 'width' of a floating, non-replaced element in normal flow is given by 'shrink-to-fit' width calculation, then such calculated width can be furthermore constrained, reduced by a max-width declaration. If width of an absolutely positioned, non-replaced element resorts to 'shrink-to-fit' width calculation but its own child uses a constrained length resulting from a max-width declaration, then such constrained length will define the preferred width in 'shrink-to-fit' width calculation.
abspos-008
Shrink wrapping of absolute positioned blocks
abspos-010
Absolutely positioned tables must shrink wrap
abspos-023 (may)
left:auto for fixed-pos blocks inside abs-pos blocks
abspos-024
Static position in rtl context
abspos-025 (image)
Positioning replaced elements with four offsets
abspos-026
Positioning replaced elements with four offsets
abspos-non-replaced-width-margin-000
CSS2.1:10.3.7 Comprehensive - Absolutely Positioned Non-Replaced Horizontal Size+Position Calculations
The values of 'left', 'right', 'margin-left', 'margin-right', and 'width' are calculated correctly for absolutely positioned non-replaced elements according to CSS2.1 Section 10.3.7.
abspos-width-001
Absolute Positioning: width:auto with table width:100%
abspos-width-002
Absolute Positioning: width:auto with block width:100%
abspos-width-003
Absolute Positioning: width:auto with block width:50%
abspos-width-004
Absolute Positioning: width:auto with block width:100%
abspos-width-005
Absolute Positioning: max-width
bidi-position-fixed-001
position:fixed in rtl context
Default horizontal position of position:fixed block should be right in rtl context, and ancestor direction should still be applied inside the block taken out of normal flow