Complete solution (100% reference)
index.html- Main HTML pagescript.js- JavaScript logicstyles.css- Styling and layoutpackage.json- Dependenciessetup.sh- Setup scriptREADME.md- Instructions (below)💡 Download the ZIP, extract it, and follow the instructions below to get started!
# Just open index.html in your browser
open index.html
# OR double-click index.html in your file explorer
No installation or setup needed! The template works immediately in any modern web browser.
Exercise 1 - Understanding Display Properties
Open styles.css and find the Exercise 1 section. Add the missing CSS display values:
Success Criteria:
.block-demo elements display as blocks (stack vertically, full width).inline-demo elements display inline (flow horizontally with text).inline-block-demo elements display as inline-block (custom width, flow inline)Hint: Look for the TODO comments in the CSS file around lines 60-80. You need to add:
display: block; for block elementsdisplay: inline; for inline elementsdisplay: inline-block; for inline-block elementsExpected Result: Block elements take full width and stack, inline elements flow together, inline-block elements have custom widths but flow inline.
Exercise 2 - Building a Navigation Bar
Complete the Flexbox properties for the navigation menu:
Success Criteria:
Hints:
.navbar class around line 90display: flex;, justify-content:, and align-items:.nav-menu, add display: flex; and gap:Properties to add:
.navbar: display, justify-content, align-items.nav-menu: display, gapflex-direction for both navbar and nav-menuExercise 3 - Product Cards with Flexbox
Finish the card grid layout using Flexbox:
Success Criteria:
Hints:
.card-container around line 130display: flex;, flex-wrap: wrap;, and gap:.card, use the flex shorthand propertyflex: 1 1 calc(33.333% - 20px); for 3-column layoutExpected Result: 3 cards per row on desktop, wrapping automatically, with consistent spacing.
Exercise 4 - Responsive Grid Gallery
Complete the CSS Grid layout for the image gallery:
Success Criteria:
Hints:
.gallery around line 170display: grid;grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));gap: for spacing between imagesProperties to add:
.gallery: display, grid-template-columns, gapExpected Result: Automatic responsive grid that adjusts column count based on screen width.
Exercise 5 - Full Website Layout
Implement a complete page layout using CSS Grid:
Success Criteria:
Hints:
.page-layout around line 210display: grid;grid-template-areas with named areasgrid-template-columns: 200px 1fr; for sidebar + maingrid-area to each child elementgrid-template-areas in mobile media query to stackStructure:
grid-template-areas:
"header header"
"sidebar main"
"footer footer";
Properties to add:
.page-layout: display, grid-template-areas, grid-template-columns, gap.page-header: grid-area: header;.page-sidebar: grid-area: sidebar;.page-main: grid-area: main;.page-footer: grid-area: footer;grid-template-areas to stack verticallyExpected Result: Classic website layout with header, sidebar, main content, and footer using CSS Grid.
transition duration)position: sticky;)display: not displays:)display: flex; is on the parent containerjustify-content controls horizontal spacing, align-items controls vertical alignmentgrid-template-columns syntaxalign-items: stretch; is set (it's the default)Before submitting:
Total: 45-60 minutes
After completing this activity:
grid-template-areasActivity 07 - CSS Display Properties W1: Front-end Design & User Experience Telebort Engineering Time: 45-60 minutes