--- url: "https://www.w3.org/WAI/WCAG22/Techniques/css/C42" titulek: "C42: Using min-height and min-width on target container to ensure sufficient target spacing | WAI | W3C" h1: "Technique C42:Using min-height and min-width on target container to ensure sufficient target spacing" popis: "" jazyk: "en" kanonicka: "" drobecky: [] zdroj: "live" wayback_snapshot: "" stazeno: "2026-09-14 06:28:17" znaku: 2710 slov: 431 kodovani: "utf-8" sha256: "9ac0f5ee8e750b07849dfafd912c2151552c097800c020a5286901e910b4cc40" --- # Technique C42:Using `min-height` and `min-width` on target container to ensure sufficient target spacing ## About this Technique This technique relates to [2.5.8 Target Size (Minimum)](https://www.w3.org/WAI/WCAG22/Understanding/target-size-minimum) (**Sufficient**). This technique applies to all technologies that support CSS and pointer input. Techniques are examples of ways to meet Web Content Accessibility Guidelines (WCAG). They are **not required** to meet WCAG. Content can satisfy the normative requirements of WCAG even if it does not use any of the documented techniques. See [About WCAG Techniques](https://www.w3.org/WAI/WCAG22/Techniques/about). ## Description The objective of this technique is to ensure that links in navigation or pagination menus will be spaced so that they fall within an area that measures at least 24 by 24 CSS pixels if the target area itself is smaller than that. The aim is to provide an adequate target clearance so the offset to adjacent targets is sufficient to prevent accidental pointer activation of adjacent targets. ## Examples The following example can be seen in the [working example](../../working-examples/css-24px-target-size/). ### Example 1: Using a `display` value of `flex` with `min-height` and `min-width` This example uses `min-height` and `min-width` on the list items containing the pagination links. The links don't meet the 24 by 24 CSS pixels size requirement, but centering the links inside containers that are at least 24 by 24 CSS pixels ensures sufficient spacing. The links' 24 CSS pixel diameter circles will each be completely within their containing list items, so they won't intersect each other. Figure 1. Example of using CSS to ensure enough spacing around targets #### The HTML ``` ``` #### The CSS ``` ol { display: flex; flex-wrap: wrap; list-style: none; } li { margin: 3px; min-height: 24px; min-width: 24px; text-align: center; } ``` ## Tests ### Procedure For each undersized target that has no sufficiently large equivalent, that isn't in a sentence or otherwise constrained by the `line-height` of non-target text, that has had its size modified by the author, and whose presentation isn't essential: 1. Draw a 24px diameter circle centered on the target's bounding box. 2. Check that the circle from #1 does not intersect any other target. 3. Check that the circle from #1 does not intersect any other undersized target's circle. ### Expected Results - #2 and #3 are true. Back to Top