Padding, Borders, Outlines, and Margins
Chapter 7
Figures
- The CSS box model
- Adding padding to elements
- The effect of padding on bordered block-level elements
- Mixed-value padding
- Value-replication pattern
- Using padding instead of margins
- More than one single-side padding
- Logical padding
- Padding, percentages, and the widths of parent elements
- Mixed padding
- Top padding on an inline nonreplaced element
- An inline nonreplaced element with left padding
- An inline nonreplaced element with 25-pixel side padding
- An inline nonreplaced element with 25-pixel side padding displayed across two lines of text
- Padding replaced elements
- Padding replaced elements
- Border styles
- Two valid ways of rendering inset
- Applying an outset border to a hyperlinked image
- Two outset borders
- Equivalent style rules
- Removing the left border
- Logical border styles
- The relation of border-width keywords to each other
- Value replication and uneven border widths
- Borders have many aspects
- Border colors based on the element’s foreground and the value of the border-color property
- Using transparent borders
- Setting a bottom border with a shorthand property
- Very complex borders
- Dashing across the top of an element
- A really short border declaration
- Using the cascade to your advantage
- Borders on inline nonreplaced elements
- Inline nonreplaced elements with inline-start borders
- Borders on inline replaced elements
- How border radii are calculated
- How percentage border radii are calculated
- A variety of rounded corners
- Elements with rounded corners are still boxes
- Elliptical corner rounding
- Different elliptical rounding calculations
- Rounded corners up close
- Links shaped like word balloons
- Rounding the block-start, inline-end corner
- Defining a border image’s source
- Various slicing patterns
- An all-around image border
- Various patterns that prevent side slices
- Number slicing
- Slice-lines at 25 pixels
- Using the fill slice
- Uneven border image widths
- Placing slice-lines for the border image’s width
- A border with and without its border image
- Placement of percentage slice-lines
- Various numeric border image widths
- Creating an image border overhang
- Various image-repeat patterns
- A variety of space repetitions
- A simple plaque effect and its older-browser fallback
- A wavy border
- The background area, visible through the image border
- Various outline styles
- Various outline widths
- Various outlines
- Outline over margin
- Overlapping outlines
- Discontinuous and nonrectangular outlines
- Paragraphs with, and without, margins
- Setting a margin for h1 elements
- Mixed-value margins
- Parent widths and percentages
- Collapsing margins
- Margins collapsing with parents
- Margins collapsing with parents, revealed
- Negative margins in action
- Punching out of a parent
- An inline nonreplaced element with an inline-start margin
- An inline nonreplaced element with 25-pixel side margins
- An inline nonreplaced element with 25-pixel side margin displayed across two lines of text
- An inline nonreplaced element with a negative margin
- Inline replaced elements with differing margin values