Full stack development

Stage 1 · Lesson 3 of 8

Flexbox, Grid and responsive layout

Web foundations: HTML, CSS and JavaScript

Most layouts need two tools. lines items up in one direction, a row or a column. It suits nav bars, toolbars and centring things.

Grid handles rows and columns at the same time. It suits whole page layouts and galleries of cards. For example, repeat(auto-fill, minmax(220px, 1fr)) gives a grid that adapts to any screen with no media queries at all.

Build mobile first. Write the narrow phone layout as the default. Then add min-width media queries (rules that apply from a certain screen width) as the screen grows. Include the , or phones will show a tiny zoomed-out desktop page.

Common trapfixed pixel widths that overflow a 375px phone screen, so test at that width in the browser dev tools.

A question to check yourself, an AI practice session and 1 cheat sheet entry come with the full roadmap. Unlock

Resources for this stage

Start with· follow one of these

  • CoursePaid
    Grokking JavaScript Fundamentals

    Design Gurus · Beginner · $50

    Guided course on the language core if you want structure and quizzes

  • CourseFree
    The Odin Project

    The Odin Project · Beginner

    Free Foundations course: HTML, CSS and JavaScript built in your own editor

Practise

  • Real designs to rebuild, so layout and interactivity get proper practice

Keep handy

  • The reference for HTML, CSS, JavaScript and browser APIs

  • Quick syntax lookups for HTML, CSS and JavaScript while you build

Also worth your time

Mark this stage as not done?