Padding
Part of the Fundamentals section of Coddy's Tailwind CSS journey. Lesson 6 of 55.
A ticket with p-3 has 12 pixels of padding on all four sides. With the default 16-pixel root font and 0.25rem spacing unit, a numeric spacing value multiplies 4 pixels.
<div class="p-3">Museum sample</div>Padding creates space inside the border. Increasing padding moves content away from the edge while the background still paints the padded area. It does not create separation outside the box.
Challenge
EasyPad the reservation ticket by 28 pixels on every side.
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 id="target" class="">Reservation</div>
</body></html>
This lesson includes a short quiz. Start the lesson to answer it and track your progress.
All lessons in Fundamentals
1Meet Tailwind
A Styled First RunChoosing UtilitiesCombining UtilitiesThe Local StylesheetRecap: Meet Tailwind