Menu
CoddyTech

Outer Margins

Part of the Fundamentals section of Coddy's Tailwind CSS journey. Lesson 8 of 55.

A footnote with mt-3 has a 12-pixel top margin outside its border. Unlike padding, that space is not painted with the footnote background.

<div class="mt-3">Museum sample</div>

The side marker identifies the affected edge: mt is top and mb is bottom. Vertical margins of ordinary block siblings can collapse; use a parent layout gap when you need reliable repeated separation.

challenge icon

Challenge

Easy

Move the registration note away from the preceding content with a 28-pixel top margin.

Keep the supplied content and element IDs. Edit the HTML utility classes or the requested CSS. Click Run preview to refresh the preview after edits, then use Check/Run code to grade your work.

Try it yourself

<!doctype html>
<html lang="en"><head><meta charset="utf-8"><meta name="viewport" content="width=device-width,initial-scale=1"><title>Practice studio</title><link rel="stylesheet" href="./styles.css"></head><body>
<div class="flow-root"><div id="target" class="">Registration closes Friday</div></div>
</body></html>
quiz iconTest yourself

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

All lessons in Fundamentals