← Back to CoursesWeb Design & Development: Beginner

Neuroanatomy Explorer

Drag to rotate · scroll to zoom · click regions to explore

View
Loading 3D model…

Click a region
to explore it

Memory Deck

Flip each card and rate whether you knew it. Your score is saved.

Term
Definition

Deck complete — score saved.

Match the Pairs

Match each term to its definition. Finish the board to earn your score.

All matched — score saved.

Concept Constellation

Every key idea in this course, mapped as an explorable 3D constellation. Drag to rotate, scroll to zoom, click a node.

Click a node to read its definition.

Layout with CSS: Box Model, Flexbox, and Grid

Manual: General · Subject: Web Design & Development

Learn the foundations of arranging elements on the page.

How Layout Works

The box model

Every element on a page behaves like a box. The box model includes content, padding, border, and margin.

Box model parts

PartMeaning
ContentThe actual text or image
PaddingSpace inside the border
BorderThe line around the element
MarginSpace outside the border

Modern layout tools

Flexbox is great for arranging items in one direction, such as a row or column. Grid is great for two-dimensional layouts with rows and columns.

Flexbox vs Grid

Flexbox

  • One-dimensional layout
  • Good for nav bars, toolbars, aligned rows or columns

Grid

  • Two-dimensional layout
  • Good for page sections, cards, and structured layouts
🔑

Rule of thumb

Use Flexbox for alignment in one direction and Grid for overall page structure when both rows and columns matter.

Which CSS layout system is especially useful for two-dimensional page structures?

Name the four main parts of the box model.

Which tool is usually best for laying out items in a single row?