thecodezone.
The Code Zone
Short steps, at your pace · Free lessons and practice · Member video walkthroughs
Save your next small win.

Checking your account…

Responsive Web Design freeCodeCamp companion

Responsive Web Design / CSS / The Box Model

Build a Confidential Email PageKnow the difference between layout and appearance.

Watch Rob build the project, understand what each part is for, then work through the official freeCodeCamp lab at your own pace.

12 requirements19:57 walkthroughBeginner · Lab · CSS

ORIGINAL WALKTHROUGH · 19:57

Watch with Rob.

Pause whenever you want to try a change. You can return to the lesson at any time.

LEARN WITH THE CODE ZONE

Unlock this video walkthrough

Written lessons and coding practice are free. Video walkthroughs are included with a paid Code Zone membership or an active free trial.

Have a Code Zone website account? Use your learning account’s email to get a six-digit sign-in code, or use your existing website password.

Need a website account? Paid Skool members and active trial members can use the email from their membership questions to request a sign-in code. No invite link or Skool password needed.

Close this window to keep practicing. After signing in, you’ll return to this lesson.

Video walkthroughs are included with an active Code Zone membership. The written lesson and practice are free.

Current freeCodeCamp instructions are the reference when a recording differs. These guide topics are not timestamped video chapters.

Finished this walkthrough?

Mark it complete to keep your place in The Code Zone. This does not submit or complete the official freeCodeCamp project.

Next: Build a Flexbox Photo Gallery

THE IDEA BEHIND THE BUILD

What this lab teaches

This lab gives an ordinary text document a deliberately marked-up appearance. The outer box has a precise total width, two stamps sit inside it and selected text fragments are visually blurred. Each effect has a different relationship to the document’s layout.

Calculate the full box before adding the decorative details. Border-box sizing includes padding and border in the declared width, inline-block keeps compact stamp boxes in inline flow, and rotation changes their painted angle. Blur is purely a visual exercise: the text remains in the document, so it must never be used to protect real confidential information.

01

Calculate the outer width

Distinguish content width from padding, border and external margins.

02

Style compact stamp boxes

Combine inline-block geometry with a visual rotation.

03

Understand the limits of filters

Explain why blurred text is still present in the source and accessible to inspection.

Cartoon Rob measures a mock document’s border and padding, then adds tilted decorative stamps and blurred sample text.
A mock confidential document illustrates box sizing and visual effects. CSS blur does not securely redact information.

REVIEW THE REQUIREMENTS · THREE CLEAR GOALS

Your route through the lab

These groups are a reading guide to the lab, rather than timestamped chapters of the video.

01Topics 1–2

Structure and size the document

Group the mock email and account for its complete box width.

Check your understanding: The stated total width includes padding and border.

Explore topic 1
02Topics 3–4

Build the decorative stamps

Create compact marked boxes and rotate their painted appearance.

Check your understanding: The stamps fit without confusing rotation with layout spacing.

Explore topic 3
03Topic 5

Review the text effect

Blur only the required sample fragments and run the official checks.

Check your understanding: You understand that blur is not secure redaction.

Explore topic 5

SEE HOW THE PARTS FIT

A page with a clear structure

This separate equipment note demonstrates a total-width calculation. Different class names and dimensions keep it distinct from the completed mock-email lab.

example.csscss · example
.equipment-note {
  box-sizing: border-box;
  width: 360px;
  padding: 24px;
  border: 3px solid;
}
/* Content width: 360 - 48 - 6 = 306px. */

Three things to pay attention to

Margins remain outside border-box

Border-box includes padding and borders, but not the external margins.

Rotation does not move neighboring boxes

A tilted edge can overlap content even when the untransformed layout boxes fit.

Blur does not remove a secret

Source text remains available. This demonstration is not a privacy or redaction mechanism.

UNDERSTAND IT HERE · PRACTICE IT THERE

Explore the key concepts

Choose a topic for a plain-English explanation, a separate code example and resources to explore. When you are ready, its button opens the official freeCodeCamp lab. Your official tests and completion stay on freeCodeCamp.

Topic 1Group the mock email content

UNDERSTAND THE IDEA

One main region contains the document and its decorative markings. An article groups a self-contained piece of content. A headline, byline, date and paragraphs help a reader understand that piece.

What you will do

Create the required main element with its specified identity and at least three paragraphs.

A separate example to explore
step-1-example.htmlhtml · example
<article class="workshop-report">
  <h1>A community repair day</h1>
  <p>Neighbors restored their old radios.</p>
</article>

What to notice: This small original report is separate from the target newspaper. Choose elements for their meaning, then apply visual classes.

Resources to explore

Read another explanation or experiment with examples before trying the official lab.

Ready to try it? Use freeCodeCamp’s exact requirements and run its checks there. The example above is for understanding the concept.

Topic 2Account for the full document width

UNDERSTAND THE IDEA

The specified total width includes padding and border, not external margin. Box sizing determines whether a declared width describes only the content or the content plus padding and border. Margins remain outside either calculation.

What you will do

Apply the requested width, padding, top margin and border; choose sizing that keeps the total width within the stated value.

A separate example to explore
step-2-example.csscss · example
.equipment-note { box-sizing: border-box; width: 360px; padding: 24px; border: 3px solid; }

What to notice: With these different values, 360px includes padding and border. The remaining content width is 306px; external margins are additional.

Resources to explore

Read another explanation or experiment with examples before trying the official lab.

Ready to try it? Use freeCodeCamp’s exact requirements and run its checks there. The example above is for understanding the concept.

Topic 3Build the two decorative stamps

UNDERSTAND THE IDEA

The stamps are compact boxes alongside surrounding inline content. Inline-block lets boxes sit in inline flow while retaining dimensions. Whitespace between their tags can still occupy room in that flow.

What you will do

Add the two required stamp divs and text, then apply inline-block display, padding, left margin and borders.

A separate example to explore
step-3-example.csscss · example
.badge, .overlay { display: inline-block; }

What to notice: These classes belong to a different visual composition. Check the combined widths, borders and inline whitespace before assuming two boxes will fit.

Resources to explore

Read another explanation or experiment with examples before trying the official lab.

Ready to try it? Use freeCodeCamp’s exact requirements and run its checks there. The example above is for understanding the concept.

Topic 4Tilt the stamp boxes

UNDERSTAND THE IDEA

A transform changes appearance without reserving a rotated layout footprint. A rotation changes the rendered orientation around the transform origin. It does not reserve a rotated outline in the normal document flow.

What you will do

Rotate both required stamps with CSS and inspect potential overlaps.

A separate example to explore
step-4-example.csscss · example
.paint-block { transform: rotate(-1deg); }

What to notice: A negative angle rotates in the opposite direction to a positive one in the usual writing context. Inspect edges and overlaps after transforming.

Resources to explore

Read another explanation or experiment with examples before trying the official lab.

Ready to try it? Use freeCodeCamp’s exact requirements and run its checks there. The example above is for understanding the concept.

Topic 5Blur selected demonstration text

UNDERSTAND THE IDEA

Blur changes rendered appearance while the source text remains accessible. A blur filter softens the rendered element and its contents. A blurred edge and a box shadow are different effects, even when both suggest softness.

What you will do

Wrap the required paragraph fragments in spans, apply the requested blur filter and run the official checks. Never use this effect to hide actual secrets.

A separate example to explore
step-5-example.csscss · example
.paint-area { filter: blur(1.5px); }

What to notice: This separate blur value is illustrative. Filters affect the rendered content; they do not change the underlying document structure.

Resources to explore

Read another explanation or experiment with examples before trying the official lab.

Ready to try it? Use freeCodeCamp’s exact requirements and run its checks there. The example above is for understanding the concept.

READY TO BUILD?

Keep the instructions beside the video.

Start the official lab in a new tab, play the walkthrough here, and pause to make each change yourself. Run freeCodeCamp’s checks before moving on. Write and check your project in the official freeCodeCamp editor.

An independent walkthrough by The Code Zone. Not affiliated with or endorsed by freeCodeCamp. The project and official tests belong to freeCodeCamp; the explanations and visual guide on this page are our companion material.