Basic Visual Formatting
Chapter 7
Figures
- The content area and its surroundings
- Changing the display role from inline to block
- Changing the display role from list-item to inline
- The complete box model
- The effects of box-sizing
- Additive padding and margin
- Subtracted padding
- Element boxes are as wide as the width of their containing block
- The “seven properties” of horizontal formatting
- Horizontal properties that can be set to auto
- Overriding the margin-right setting
- Automatic width
- Setting an explicit width
- What happens when both the width and right margin are auto
- Offset is implicit in the parent’s margins and padding
- Wider children through negative margins
- Setting a negative left margin
- Changing replaced element widths
- Offset is implicit in the parent’s margins and padding
- The “seven properties” of vertical formatting
- Vertical properties that can be set to auto
- Percentage heights in different circumstances
- Auto heights with block-level children
- Collapsed versus uncollapsed margins
- Collapsing in detail
- Collapsing (or not) with borders added to the mix
- Examples of negative vertical margins
- The effects of a negative top margin
- The effects of a negative bottom margin
- Collapsing margins and negative margins, in detail
- The content of list items
- Markers inside and outside the list
- A single-line inline element
- A multiple-line inline element
- Showing lines in different alignments
- Em boxes determine content area height
- Content area plus leading equals inline box
- Inline boxes within a line
- Line boxes within a paragraph
- Vertical alignment affects line box height
- Aligning an inline element to the line box
- Text protruding from the line box (again)
- Assigning the line-height property to inline elements
- Increasing line-height to leave room for inline borders
- Using a scaling factor for line-height
- Inline borders and line-box layout
- Padding and borders do not alter line-height
- Padding and margins on the ends of an inline element
- Overlapping inline backgrounds
- Sliced and cloned inline fragments
- Replaced elements can increase the height of the line box but not the value of line-height
- Adding padding, borders, and margins to an inline replaced element increases its inline box
- The effect of negative margins on inline replaced elements
- Inline replaced elements sit on the baseline
- Pulling inline replaced elements down with a negative bottom margin
- The behavior of an inline-block element
- Autosizing of an inline-block element
- A regular unordered list, and one with display: contents