
Mini lesson 5 of 30 · Build and publish
Try the page as a phone visitor
Who is this for?
People whose website is difficult to use on a phone. You can describe a visible problem and let a coding assistant edit the supplied files; CSS knowledge is not required.
Begin with the task, not a list of CSS rules.
Purpose of this lesson
- Find a concrete phone-use problem.
- Request a focused repair without losing content.
- Retest links, enlarged text and wide views.
Explanation, worked example and practice
Before you start
A browser and the supplied before/after gallery. A coding assistant can open and change the folder. Use a real phone if available, or a narrow browser view; no separate mobile app is needed. Worked answers are illustrative examples, not completed tests on your account. Replace their sample observations with your own results, or identify the step that is still blocked.
Check your starting skills
These are useful skills, not locked course requirements. If you can already do them, start this lesson; otherwise open the linked preparation. The supplied starter files mean you do not need an existing personal website.
- How to build your first personal website
Create an introduction, project section and contact route from a supplied starter.
Estimated time: 20–32 min
Estimates for the supplied starter files with prerequisite accounts and tools ready. Setup, deployment queues and delivery/DNS waits take additional time. Estimates cover one small page. Test on a real phone when available; device emulation does not reproduce every device condition.
Understand the idea
Open before/index.html at a phone-sized width near 390 pixels. Try finding a project and reaching Contact. Keep a wide view for comparison and note the first thing you cannot read or activate comfortably.
Observe whether you need sideways scrolling or whether a link lies outside the screen. Do not assume that a smaller-looking page is usable.
A concrete example
The supplied before page has a wide two-card layout. On a narrow view, try finding A community garden diary, then Contact. “The second card is beyond the right edge at this width” describes a testable problem.
Open before/index.html and inspect the supplied gallery. Repair phone overflow while keeping both projects and Contact. Keep the desktop usable. Do not hide content just to remove scrolling. Explain the visible change and help me check 320px,390px,desktop,keyboard and enlarged text. I do not need a CSS lecture before trying the result.Files for this step
Open or download the files below. When saving a project, keep the folder paths shown in the filenames.
Try it yourself
Which visitor action is awkward or blocked in the supplied phone view?
Show a worked solution
Example observation: At about 390 pixels, I can see the first reading-club card but need sideways scrolling to see the second garden card. Finding both projects is awkward. I will keep this same width and task for the repair check.
What a sound answer includes
- Names a specific blocked or awkward visitor action at a stated narrow width.
- Identifies the visible overflow/unreachable content rather than only requesting a nicer design.
How it works (optional)
Make your website usable on a phone
A mobile-friendly page lets a person complete a task without fighting the layout.
Our test task is to find a project and reach its contact route. We will check that task at narrow widths instead of judging only whether the page looks smaller.
Open before/index.html and set the browser viewport near 390 pixels. The supplied page intentionally uses a fixed-width layout, so it extends beyond the screen. Keep a desktop view as a comparison.
Worked example
If a visitor must drag sideways to reach a project link, the task is awkward even when every word technically exists on the page. Hiding the horizontal scrollbar would not repair the underlying layout.
Extra implementation exercise
The project link exists, but it is outside the phone screen and requires sideways scrolling. Has our task passed?
Show a worked solution
No. Find the element that exceeds the viewport and repair its sizing. Then repeat the project-to-contact task.
- Evaluates whether the task is usable, not merely whether the link exists.
- Identifies overflow as something to inspect rather than hide.

Step 1 · How to make your website usable on phones
Ask for one visible repair
Let the assistant identify the layout rule behind the symptom.
Explanation, worked example and practice
Understand the idea
Give the assistant the supplied folder and a screenshot or precise description. Ask it to keep both project cards and Contact while removing the phone overflow. It can inspect and change the code for you.
Reload at the same width and repeat the failed action. Hiding a project or cutting off its text is not a successful repair.
A concrete example
Before: the garden card is off to the right. Request: keep both cards and make them readable here. After: repeat the search for the garden card; a prettier first card alone does not answer the original problem.
Files for this step
Open or download the files below. When saving a project, keep the folder paths shown in the filenames.
Try it yourself
What did you ask to preserve, and did the repaired view meet that request?
Show a worked solution
Example request and check: “Keep both project cards and Contact; make the full garden-card text readable without sideways scrolling.” After the change, I checked the same 390-pixel view: both cards were available and Contact was reachable. Removing the garden card would not meet my request.
What a sound answer includes
- Specifies which project/contact content must survive the repair.
- Repeats the original action at the same width and reports whether it now works.
How it works (optional)
Find the element that is too wide
Measure the page and inspect its largest fixed-width elements before changing everything.
In developer tools, inspect main and the project grid. The starter gives main a width of 1100 pixels and each grid column a width of 500 pixels. Neither adapts to a 390-pixel screen.
The viewport meta tag is already present. Adding it again will not remove fixed widths. Compare the offending element’s box with the available viewport and change the constraint that causes the mismatch.
After repairing main, inspect the grid itself: two 500px columns still need 1000px plus their gap. Use flexible columns such as repeat(2, minmax(0, 1fr)), then a one-column layout when two readable cards no longer fit. Test just above and below the point where the content breaks.
Worked example
This main rule sets a maximum while allowing the container to shrink to the available width. The border-box rule keeps padding inside its assigned width.
* { box-sizing: border-box; }
main {
width: min(1100px, 100%);
margin: auto;
padding: 24px;
}Extra implementation exercise
After fixing main, the two 500-pixel grid columns still overflow. Which rule remains responsible?
Show a worked solution
The grid still requires two fixed 500-pixel columns plus its gap. Make the columns flexible and switch to one column when the content needs it.
- Identifies the fixed grid-column widths.
- Avoids shrinking body text as a substitute for fixing the layout.

Step 2 · How to make your website usable on phones
Check a nearby width
A repair should work around the example size too.
Explanation, worked example and practice
Understand the idea
Try a narrower and slightly wider view, with a long title. Ask for a further adjustment only where content becomes cramped or unreadable. You do not need to choose a magic breakpoint number yourself.
Confirm that cards and text remain readable and links stay reachable across the tested widths. Keep a wide-screen comparison as well.
A concrete example
A repair that works at 390 pixels can still fail at 320. Use the same long garden-project title at both widths, then confirm the wide page has not lost a card.
Files for this step
Open or download the files below. When saving a project, keep the folder paths shown in the filenames.
Try it yourself
Which widths did you try, and where did the content remain usable or fail?
Show a worked solution
Example check record: At about 320 and 390 pixels I could read both project titles and reach Contact without sideways scrolling. At about 1440 pixels both cards remained present. This covers these browser views; it does not establish every phone or screen.
What a sound answer includes
- Names more than one narrow width plus the wide comparison.
- Reports where the same content and links remained usable or identifies the exact failing width.
How it works (optional)
Let content choose a comfortable layout
Flexible columns and a small-screen breakpoint keep cards readable without shrinking their text.
Use minmax(0,1fr) for flexible columns and a one-column rule at a suitable narrow width. The exact breakpoint is a content decision, not a universal phone width. Test your actual headings and links around it.
Keep the heading responsive with clamp and allow long text to wrap. A real project title or address can be longer than the sample, so check that content too. The worked solution provides a complete CSS file after you try your own repair.
A plain 1fr column still has an automatic minimum that can be influenced by long content. minmax(0,1fr) permits that column to shrink below that automatic minimum; wrapping and the one-column breakpoint then keep the content usable. This repairs the constraint rather than disguising it with overflow:hidden.
Worked example
A two-column gallery can become a single column while preserving the same content and navigation. The user does not need a different page for the phone.
.projects {
display: grid;
grid-template-columns: repeat(2, minmax(0, 1fr));
gap: 24px;
}
@media (max-width: 700px) {
.projects { grid-template-columns: 1fr; }
}Extra implementation exercise
At 710 pixels, your cards are cramped even though the example breakpoint is 700. Must you keep 700?
Show a worked solution
No. Move the breakpoint to a width where your content remains comfortable. Check the layout just above and below that width, rather than copying a number without testing it.
- Chooses the breakpoint from actual content needs.
- Retests both sides of the changed breakpoint.

Step 3 · How to make your website usable on phones
Use the controls and larger text
Layout is only one part of phone usability.
Explanation, worked example and practice
Understand the idea
Activate Projects and Contact, move through links with the keyboard and increase browser zoom or text size. If a menu relies on mouse hover, ask the assistant for a tap/keyboard-friendly route.
Check that focus is visible and the same essential actions remain available after text enlarges. Try a real phone when possible; label emulation honestly.
A concrete example
For a keyboard check, press Tab until Contact is outlined, then Enter. For a text check, enlarge browser text or zoom and find Contact again. These are concrete actions the learner can perform without choosing CSS rules.
Files for this step
Open or download the files below. When saving a project, keep the folder paths shown in the filenames.
Try it yourself
Can you complete the project/contact task with taps, keyboard and larger text?
Show a worked solution
Example check record: In the narrow browser view, Projects and Contact both worked. Tab moved to each link with a visible outline, and Enter followed it. With browser zoom increased, I could still read both cards and reach Contact. I have not tested a real phone, so tap behaviour there remains unverified.
What a sound answer includes
- Includes actual tap/link, keyboard-focus and enlarged-text observations.
- Identifies emulated versus real-device coverage and any action still blocked.
How it works (optional)
Check interaction and enlarged text
A page can fit the screen and still be hard to use.
Activate the Projects and Contact links. Ensure that controls have comfortable spacing, their labels describe the action and keyboard focus remains visible. Do not rely on hover-only behavior for essential information.
Increase browser zoom or text size and repeat the task. Check narrow and wide layouts with real content. Emulation is useful, but a real phone can reveal differences in touch behavior, browser UI and text rendering.
Worked example
The worked solution adds padding around links and a visible focus outline. Those changes make the interaction easier to find and use; they do not replace testing the actual link destinations.
Extra implementation exercise
A menu appears only when a mouse hovers over a label. What would you change for phone use?
Show a worked solution
Provide a clear button or native disclosure that works by tap and keyboard. Test opening, following a link and closing it without requiring hover.
- Provides a click/tap or native disclosure interaction.
- Keeps keyboard access and visible focus.

Step 4 · How to make your website usable on phones
Hand over the repaired gallery
Finish with repeatable checks another person can understand.
Explanation, worked example and practice
Understand the idea
Save the repaired files and repeat the same task at approximately 320, 390 and 1440 pixels. Compare your result with the complete reference only after your own attempt.
Keep all original project/contact content. Record one before/after problem and the interaction/text checks you actually performed.
A concrete example
A concise handoff names the original blocked action and how it behaves now. “Responsive fixed” gives another person no repeatable check.
Files for this step
Open or download the files below. When saving a project, keep the folder paths shown in the filenames.
Try it yourself
Provide your repaired page and a concise record of the visitor checks.
What to produce: The repaired runnable gallery and a short before/after phone, desktop and interaction record.
Show a worked solution
Example handoff: Before, the garden card ran beyond the narrow screen. The repaired gallery keeps A reading-club page, A community garden diary and Contact, and both cards can be read without sideways scrolling.
Example verification record: About 320 and 390 pixels — both cards and Contact usable; about 1440 pixels — both cards retained; Tab/Enter — links reachable with visible focus; enlarged text — contact still reachable. Real-phone behaviour is the remaining check.
What a sound answer includes
- Provides the repaired runnable page with both original projects and contact content.
- Connects a before/after symptom to named width and interaction checks.
How it works (optional)
Your assignment: repair and test the gallery
Submit the changed files and observations for the same visitor task at several widths.
Repair the before version without deleting either project or the contact section. Try widths near 320, 390 and 1440 pixels, then check enlarged text.
Record the original culprit and the rule that fixed it. If a device test reveals another problem, describe that observation separately instead of claiming all devices were covered.
Worked example
“The main container was 1100px; it now fits the viewport, and the project grid becomes one column” explains the fix. “Mobile looks good” does not explain what you verified.
The complete reference walkthrough is available in reference/assignment-walkthrough.txt. Compare its steps with your own result; fill the test record from observations in your own project.
Extra implementation exercise
Make the gallery usable on a phone and provide a short behavior test record.
Show a worked solution
Reproduce the broken starter at 390px. Its fixed main width and fixed grid columns are separate sources of overflow; repairing only one does not repair the other.
Compare the worked-solution CSS: main uses a bounded flexible width, cards use minmax(0,1fr), long text may wrap and the grid becomes one column when the content needs it. Keep readable font sizes rather than hiding overflow.
At 320px, 390px and desktop width, use Projects then Contact by keyboard or touch. Enlarge text, insert a long title and check that controls remain visible and usable. A screenshot without a scrollbar is insufficient if the contact action cannot be reached.
- Content remains available without horizontal overflow at the tested widths.
- Project and contact tasks work with readable text, usable controls and visible focus.
Was this lesson useful?
Leave a like, or share it with someone who could use it.