CSS property `padding`
`padding` sets the inner space between the content box and border on all four sides.
CKTIS / CSS
Programming syntax, operators and concepts. Find an explanation, explore an example and return to learning.
`padding` sets the inner space between the content box and border on all four sides.
`padding-block` sets inner space at the start and end of the logical block axis.
padding-block-end sets the inner spacing at an element’s block-end edge. Unlike padding-bottom, it selects a physical side according to the writing mode rather than always targeting the bottom.
padding-block-start sets inner spacing at the start of an element’s block axis. Unlike padding-top, it targets a logical side determined by the writing mode.
The padding-bottom property sets the internal spacing at an element’s physical bottom edge. It accepts a nonnegative length or percentage; in horizontal writing mode, percentages refer to the containing block’s width, not its height.
padding-inline sets the inner spacing at the start and end of the inline axis. It lets spacing follow the writing direction and writing mode instead of hard-coding the left and right sides.
padding-inline-end sets internal spacing at the end of the inline axis. Unlike padding-right, it selects a side according to the element’s writing mode and direction.
padding-inline-start sets the inner spacing at the start of the inline axis. In horizontal writing, it maps to the left side for ltr and the right side for rtl, allowing spacing to follow the text direction.
The padding-left property sets the internal spacing on the left side of a CSS box. It accepts a nonnegative length or percentage and always targets the physical left side.
`padding-right` sets the distance from the right content edge to the right padding edge, excluding any border thickness. It accepts a nonnegative length or percentage.
padding-top sets spacing inside the top edge of a CSS box. It accepts a nonnegative length or percentage; the percentage is not calculated from the element’s height.
`page` assigns a named page type to a box that generates a class A break point; during pagination, the matching `@page` rule defines the page on which that box starts.
`paint-order` changes the painting sequence of `fill`, `stroke`, and `markers` for SVG shapes and text; `normal` uses that default sequence.
`perspective` sets, on a container, the distance from the z=0 plane to the viewer and projects three-dimensional transforms of its children; a smaller positive length produces stronger foreshortening.
`perspective-origin` sets the viewing point toward which descendants’ 3D projections converge; the initial `50% 50%` places it at the center of the reference box.
`place-content` is a shorthand for distributing the whole set of tracks or lines: its first value sets `align-content` on the cross/block axis, and its optional second value sets `justify-content` on the main/inline axis.
`place-items` sets the container’s default self-alignment for its children in one declaration: the first value goes to `align-items`, and the optional second goes to `justify-items`.
`place-self` sets one box’s self-alignment within its container: the first value expands to `align-self`, and the optional second expands to `justify-self`.
`pointer-events` decides whether an element’s boxes participate in pointer hit-testing: `auto` keeps normal targeting, while `none` lets the element underneath become the target.
`position` selects a box’s positioning scheme: `static` leaves it unpositioned, `relative` offsets it after normal layout, `absolute` removes it from flow, `sticky` constrains its offset during scrolling, and `fixed` usually attaches it to the viewport.
`position-anchor` selects the default anchor element of an absolutely positioned box; implicit references in `anchor()`, as well as `position-area` and `position-try`, use that default.
`position-area` selects a region of the 3×3 grid formed by the containing block and default-anchor edges, and that region becomes the positioned box’s containing block.
`position-try` is a shorthand that sets the `position-try-fallbacks` list and its `position-try-order` sorting mode for an absolutely positioned box.
`position-try-fallbacks` supplies a comma-separated list of additional position options that an absolute box can try after its base styles to avoid overflow.