HTML 5 and CSS 3 – Illustrated 2nd Ed. Instructor’s Manual: Unit I Page 3 of 10
2. Classroom Discussion: What websites have you visited that have different layouts on different size
screens? Are the layout changes for each minor or significant? Why do you think the developers made
these changes?
4. Critical Thinking: Media queries generally use the min-width and max–width media features, but
not min-height or max-height. Why do you think this is the case?
LECTURE NOTES:
• Explain that the first step in implementing responsive design is to create a default layout for the
smallest or largest browser width you want to support.
TEACHER TIP
Mobile-first design is an approach that prioritizes the mobile experience by creating a mobile layout
as the starting layout. A designer using this approach would be more likely to create a default layout
for the smallest width to support, then use max-width media queries to specify layouts for larger
screens.
• Introduce the process of identifying a breakpoint, then creating a multipart media query using the
screen media type with the min-width or max-width media feature.
• Explain that multiple media queries can be separated by a comma, just like CSS selectors, so you can
add a multipart media query to an existing media query, such as a print media query. In this case,
the style rules in the media query apply to either selector.
FIGURES: I-2, I-3
BOXES:
1. Quick Tip: The comma before the word
print
in the media query means
or
, so the query applies to
any printed output regardless of the browser width when the Print command is activated.
2. Quick Tip: The @media print style rule includes the declaration page-break-before:
always for section elements, which causes each section element to start on a new page in
printed output.
3. Implementing Responsive Images
The img element accepts a single filename as the value for the src attribute. When you create a
responsive website that will be viewable in browser windows of different widths, you generally use a
large image, which looks good on a large screen, and scale it down for smaller screens. However, large