Chapter 10  Visual formatting model details  10.3.5 Floating, nonreplaced elements
Go to the relevant page of the specification.
 absolutenonreplacedwidth019 (ahem)

'shrinktofit' width of absolutely positioned, nonreplaced elements  direction (lefttoright), float and maxwidth
When direction is lefttoright and 'left' is set to static position and 'width' and 'right' are 'auto', then the used value of 'width' is given by 'shrinktofit' width calculation. If 'width' of an floating, nonreplaced element in normal flow computes to 'auto', then the used value of 'width' is also given by 'shrinktofit' width calculation. If 'width' of a floating, nonreplaced element in normal flow is given by 'shrinktofit' width calculation, then such calculated width can be furthermore constrained, reduced by a maxwidth declaration. If width of an absolutely positioned, nonreplaced element resorts to 'shrinktofit' width calculation but its own child uses a constrained length resulting from a maxwidth declaration, then such constrained length will define the preferred width in 'shrinktofit' width calculation.  absolutenonreplacedwidth020 (ahem)

'shrinktofit' width of absolutely positioned, nonreplaced elements  direction (lefttoright), float and maxwidth
When direction is lefttoright and 'left' is set to static position and 'width' and 'right' are 'auto', then the used value of 'width' is given by 'shrinktofit' width calculation. If 'width' of an floating, nonreplaced element in normal flow computes to 'auto', then the used value of 'width' is also given by 'shrinktofit' width calculation. If 'width' of a floating, nonreplaced element in normal flow is given by 'shrinktofit' width calculation, then such calculated width can be furthermore constrained, reduced by a maxwidth declaration. If width of an absolutely positioned, nonreplaced element resorts to 'shrinktofit' width calculation but its own child uses a constrained length resulting from a maxwidth declaration, then such constrained length will define the preferred width in 'shrinktofit' width calculation.  absolutenonreplacedwidth023 (ahem)

'shrinktofit' width of absolutely positioned, nonreplaced elements  direction (righttoleft), float and maxwidth
When direction is righttoleft and 'right' is set to static position and 'width' and 'left' are 'auto', then the used value of 'width' is given by 'shrinktofit' width calculation. If 'width' of an floating, nonreplaced element in normal flow computes to 'auto', then the used value of 'width' is also given by 'shrinktofit' width calculation. If 'width' of a floating, nonreplaced element in normal flow is given by 'shrinktofit' width calculation, then such calculated width can be furthermore constrained, reduced by a maxwidth declaration. If width of an absolutely positioned, nonreplaced element resorts to 'shrinktofit' width calculation but its own child uses a constrained length resulting from a maxwidth declaration, then such constrained length will define the preferred width in 'shrinktofit' width calculation.  absolutenonreplacedwidth024 (ahem)

'shrinktofit' width of absolutely positioned, nonreplaced elements  direction (righttoleft), float and maxwidth
When direction is righttoleft and 'right' is set to static position and 'width' and 'left' are 'auto', then the used value of 'width' is given by 'shrinktofit' width calculation. If 'width' of an floating, nonreplaced element in normal flow computes to 'auto', then the used value of 'width' is also given by 'shrinktofit' width calculation. If 'width' of a floating, nonreplaced element in normal flow is given by 'shrinktofit' width calculation, then such calculated width can be furthermore constrained, reduced by a maxwidth declaration. If width of an absolutely positioned, nonreplaced element resorts to 'shrinktofit' width calculation but its own child uses a constrained length resulting from a maxwidth declaration, then such constrained length will define the preferred width in 'shrinktofit' width calculation.  floatnonreplacedwidth001

Floating nonreplaced elements with 'auto' left margin
If 'marginleft' is computed as 'auto' its used value is '0'.  floatnonreplacedwidth002

Floating nonreplaced elements with specified left margin
If 'marginleft' is not computed as 'auto' its used value is as specified.  floatnonreplacedwidth003

Floating nonreplaced elements with 'auto' right margin
If 'marginright' is computed as 'auto' its used value is '0'.  floatnonreplacedwidth004

Floating nonreplaced elements with specified right margin
If 'marginright' is not computed as 'auto' its used value is as specified.  floatnonreplacedwidth005

Floating nonreplaced elements with left and right margins as 'auto'
If both 'marginleft' and marginright' are computed as 'auto' their used value is as '0'.  floatnonreplacedwidth006 (ahem)

Floating nonreplaced elements with 'auto' width
If 'width' computes to 'auto' then the used value of 'width' is 'shrinktofit'.  floatnonreplacedwidth007 (ahem)

'shrinktofit' width of floating, nonreplaced elements  inlineblock and maxwidth
If 'width' of a floating, nonreplaced element computes to 'auto' or 'width' of an inlineblock, nonreplaced element in normal flow computes to 'auto', then the used value of 'width' is given by 'shrinktofit' width calculation. If 'width' of an inlineblock, nonreplaced element in normal flow is given by 'shrinktofit' width calculation, then such calculated width can be furthermore constrained, reduced by a maxwidth declaration. If 'width' of a floating, nonreplaced element computes to 'auto' but its own child uses a constrained length resulting from a maxwidth declaration, then such constrained length will define the preferred width in 'shrinktofit' width calculation.  floatnonreplacedwidth008 (ahem)

'shrinktofit' width of floating, nonreplaced elements  maxwidth
If 'width' of a floating, nonreplaced element computes to 'auto', then the used value of 'width' is given by 'shrinktofit' width calculation. If 'width' of a floating, nonreplaced element is given by 'shrinktofit' width calculation, then such calculated width can be furthermore constrained, reduced by a maxwidth declaration. If 'width' of a floating, nonreplaced element computes to 'auto' but its own child uses a constrained length resulting from a maxwidth declaration, then such constrained length will define the preferred width in 'shrinktofit' width calculation.  floatnonreplacedwidth009 (ahem)

'shrinktofit' width of floating, nonreplaced elements  maxwidth
If 'width' of a floating, nonreplaced element computes to 'auto', then the used value of 'width' is given by 'shrinktofit' width calculation. If 'width' of a floating, nonreplaced element is given by 'shrinktofit' width calculation, then such calculated width can be furthermore constrained, reduced by a maxwidth declaration. If 'width' of a floating, nonreplaced element computes to 'auto' but its own child uses a constrained length resulting from a maxwidth declaration, then such constrained length will define the preferred width in 'shrinktofit' width calculation.  floatnonreplacedwidth010 (ahem)

'shrinktofit' width of floating, nonreplaced elements  width
If 'width' of a floating, nonreplaced element computes to 'auto', then the used value of 'width' is given by 'shrinktofit' width calculation. If 'width' is specified with absolute length, then the computed value is the specified value. If 'width' of a floating, nonreplaced element computes to 'auto' but its own child uses specified absolute length, then such specified absolute length will define the preferred width in 'shrinktofit' width calculation.  floatnonreplacedwidth011 (ahem)

'shrinktofit' width of floating, nonreplaced elements  inlineblock and maxwidth
If 'width' of a floating, nonreplaced element computes to 'auto' or 'width' of an inlineblock, nonreplaced element in normal flow computes to 'auto', then the used value of 'width' is given by 'shrinktofit' width calculation. If 'width' of an inlineblock, nonreplaced element in normal flow is given by 'shrinktofit' width calculation, then such calculated width can be furthermore constrained, reduced by a maxwidth declaration. If 'width' of a floating, nonreplaced element computes to 'auto' but its own child uses a constrained length resulting from a maxwidth declaration, then such constrained length will define the preferred width in 'shrinktofit' width calculation.  floatnonreplacedwidth012 (ahem)

'shrinktofit' width of floating, nonreplaced elements  maxwidth
If 'width' of a floating nonreplaced element computes to 'auto', then the used value of 'width' is given by 'shrinktofit' width calculation and such calculated width can be furthermore constrained, reduced by a maxwidth declaration.