Slides: slides/01_responsive.pdf
Time: 50 minutes (Tune In 5 / Activity 35 / Reflection 10)
Get this instruction: https://github.com/ruhendrawan/cs1520_recitation
- If in pairs: work with your peer through all parts
- If alone: self reflect and write down on the worksheet
- You do not need a grammar check
- Don’t overcorrect
- Write like you’re saying it out loud
Submit in the google form: https://forms.gle/tYEtKjJunM1wb2we6
You need to submit the zip file if you're working alone, otherwise just fill in the form.
Upload zip files named as <PITT ID>-<week>.zip, e.g. rah225-02.zip, containing:
- This worksheet
page.html(or any files related to your work)
Pairs: talk in turns. Max 1 minute per person before switching so everyone gets a chance to talk.
Working alone? Download 02-responsive-design-worksheet.md and write your responses there.
Pick 1–3 concepts from this week’s lecture and explain them in your own words (fast + messy is fine).
Concept ideas (pick any 1–3):
- Visual viewport vs layout viewport
- CSS pixels (when a pixel isn’t a pixel)
- The
<meta name="viewport" ...>tag (why it exists, what it changes) - CSS media queries (
min-width,max-width,orientation) - “Use relative sizes” + “breakpoints” (mobile-first thinking)
- What is it (in one sentence)?
- Why do we need it on phones vs laptops?
- What problem does it solve?
- What would break if we didn’t use it?
- Where would you use it in a real app/site you care about?
Do one of the three tracks below (or split into groups and compare results at the end).
- Track A — Follow-along (guided)
- Track B — Challenge
- Track C — Choose your own
Choose Option 1 or Option 2.
Option 1: Beginner in HTML CSS
Option 2: Understand the basics of HTML and CSS
- You built a page (HTML + CSS) and can show it in the browser
- You changed something and saw the browser update (small win)
- If you did Option 2: you can explain one media query you used (in plain language)
- Responsive “student dashboard”
- No-scroll mobile page
- Breakpoint story
- Goal: Build a single-page dashboard layout that feels good on phone + desktop
- Constraints:
- Use at least 2 breakpoints
- Use at least one relative unit (%,
rem,vw, etc.) - Navigation changes layout across breakpoints
- Stretch:
- Add
orientationmedia query to improve landscape mode
- Add
- Goal: Make a landing page that never causes horizontal scrolling on mobile
- Constraints:
- Test at very narrow width (like 320px)
- Images/cards scale down properly
- No fixed-width containers that force overflow
- Stretch:
- Add centered desktop layout with
max-width+ auto margins
- Add centered desktop layout with
- Goal: Layout changes “story” at different widths (grid → sidebar, etc.)
- Constraints:
- 3 layouts total: small / medium / large
- Each layout changes content emphasis
- Keep HTML the same; only CSS changes
- Stretch:
- Explain why your breakpoints are where they are (2–3 sentences)
Use this week’s topics: relative sizes, breakpoints, viewport/meta viewport, and media queries.
Examples:
- Personal homepage / portfolio grid
- Resume/CV page
- Study tracker (today/this week/done)
- Budget tracker dashboard
- Event flyer page
- “Link hub” page for online presence
Definition of done:
- Viewport meta tag used
- 2+ media queries
- Relative sizing used (%,
rem,max-width, etc.) - Readable on narrow window (no horizontal scrolling)
- You can explain what changes at each breakpoint and why
All-time best web component is <marquee>. Look at this example and be amazed!
Pairs: talk in turns. Max 1 minute per person before switching so everyone gets a chance to talk.
Working alone? Download 02-responsive-design-worksheet.md and write your responses there.
- Quick checklist is fine, no overcorrection needed
Prior lecture idea to connect: HTML metadata + the <meta> tag
- What is an HTML
<meta>tag for? - How does the viewport meta tag change what the browser does on mobile?
- How did it affect your work today?
- Which screen size are you targeting first (smallest)?
- Are you using any fixed widths that force overflow?
- Did you include the viewport meta tag?
- What is each breakpoint trying to improve (readability, spacing, layout)?