STEP 7 — RESPONSIVE DESIGN & INTERACTIVITY (Bonus)

This is an optional bonus step and a reference you can return to any time. It gathers the techniques that make a site adapt to any screen and respond to a visitor’s actions — responsive design and interactivity. This is also the first step where AI is a permitted tool: use it to explore, explain, and extend the ideas below.

How to read this page: the instructions point you to what to try. The gray-blue box gathers the reference material worth keeping. The Going Further section at the bottom links to downloadable sample folders. Nothing here is required — it is all extra credit and future reference.

 

INSTRUCTIONS

1 · Watch: responsive images, media queries & link states

This video covers three of the most useful responsive and interactive techniques at once. Watch it, then use the reference material below as you build.



2 · Make one page respond

Take a page you already built — your Step 6 layout is ideal — and add a media query so it changes on a narrow screen. Resize your browser to watch it adapt. With AI now permitted, ask it to explain any line you don’t recognize.

 

MATERIAL FOR REFERENCE

Keep these techniques handy — they are the core of responsive, interactive pages.

The viewport tag

Responsive design starts in the <head> with one line that tells phones to render the page at their real width instead of pretending to be a desktop:

<meta name="viewport" content="width=device-width, initial-scale=1">

Media queries

A media query applies CSS only when the screen meets a condition — usually a maximum width. Everything inside the braces takes effect only on screens at or below that size:

@media (max-width: 620px) {
  .footer-grid { grid-template-columns: 100%; }
}

Responsive images

Two properties keep an image from overflowing its container: cap its width at 100% of the space, and let the height follow along so it never distorts.

img {
  max-width: 100%;
  height: auto;
}

The four link states

Links can be styled for each state a visitor moves through — and the order matters, because later rules can override earlier ones:

a:link — a link not yet visited
a:visited — a link already visited
a:hover — the pointer is over the link
a:active — the moment it is clicked

 
 

GOING FURTHER (Interactive Techniques)

These sample folders show more advanced interactive and visual effects. Download one, unzip it, and study how it works — then try adapting it to your own site. Great territory to explore now that AI can help you read unfamiliar code.

 

Interactive Site Root Folder — CSS transitions & other interactive elements

Interactive Carousel Site Root Folder

Enlarging Photos Site Root Folder

Placed Images Site Root Folder

Background as ImageCSS embedded in the head

 

Video Background & Blend ModeDownload Video Site Root Folder

HTML:

<div class="overlay"></div>
<video muted="muted" autoplay="autoplay" loop="loop">
  <source src="videos/IMG_7991.mp4" type="video/mp4">
</video>

CSS:

video {
  position: absolute; top: 0; left: 0;
  width: 100%; height: 100%;
  object-fit: cover; opacity: 0.8; z-index: 0;
}
.overlay {
  position: absolute; top: 0; left: 0;
  width: 100%; height: 100%;
  background-color: #03a9f4;
  mix-blend-mode: overlay; z-index: 20;
}

 

Interactive Images — sample page

Viewport Code — sample page (complete code is in the <head>)

 
 

Bonus Work — Extra Credit

Optional, worth up to 25 bonus points. Build a step7.html page that demonstrates at least one responsive technique (a working media query is ideal) and one interactive touch (styled link states, a transition, or one of the Going Further effects). Upload it to your site. Because AI is now permitted, you may use it as a directed tool — but you should be able to explain every line you submit.