Menu
CoddyTech

Comfortable Control Targets

Part of the Responsive UI Patterns section of Coddy's Tailwind CSS journey. Lesson 47 of 55.

The clickable box of a control matters as much as its visible label. Minimum width and height create a usable floor while allowing longer text to grow. This lesson uses explicit exercise target sizes rather than claiming that one dimension alone guarantees accessibility.

<button class="inline-flex min-w-12 min-h-12 items-center justify-center">Save</button>

The example gives a button 48px minimum width and height with min-w-12 min-h-12. inline-flex items-center justify-center centers the label on both axes. Scale 11 gives 44px when a smaller exercise target is requested.

Keep native button semantics and meaningful text. Space adjacent controls and let groups wrap when necessary. Prefer minimum dimensions over fixed boxes that can squeeze longer labels or translated text.

challenge icon

Challenge

Medium

Give both native page-control buttons a minimum width and height of 44px. Center each label on both axes using flex alignment, and preserve the supplied 8px space between controls and the navigation label. Let the buttons grow if their text needs more room.

Preserve the supplied content, semantic elements and IDs. Edit the requested utility classes. Press Run preview after edits, then Check/Run code to grade the result. Supplied JavaScript is read-only.

Try it yourself

<!doctype html>
<html lang="en"><head><meta charset="utf-8"><meta name="viewport" content="width=device-width,initial-scale=1"><title>Interface workshop</title><link rel="stylesheet" href="./styles.css"></head><body>
<nav id="actions" aria-label="Page controls" class="flex gap-2"><button id="prev" class="inline-block">Prev</button><button id="next" class="inline-block">Next</button></nav>
</body></html>
quiz iconTest yourself

This lesson includes a short quiz. Start the lesson to answer it and track your progress.

All lessons in Responsive UI Patterns