Thursday, November 5, 2026 New tutorials published every day
Home
Tutorials
Core PHP PHP Course JavaScript React & Next.js Python WordPress Artificial Intelligence
Free Tools
JSON Formatter Base64 Encoder / Decoder Password Generator Text to QR Code Generator Word Counter Case Converter Age Calculator Color Converter Number to Words All Free Tools
Projects
PHP Projects — all projects
Students
Webflow Course Course Registration Download Syllabus Verify Certificate Student Leaderboard
Resources
WordPress Plugins Search tutorials About CodingCush Contact
More
Login
Lesson 04 · Design skills · 6:24

HTML & CSS in Webflow: Box Model, Flexbox and Grid

The ideas behind Webflow without writing code: structure and nesting, classes, the box model, Flexbox, Grid and CSS units, while building the Chai Corner menu.

✓ Free plan Cheat sheet Quiz · 4 questions
HTML & CSS in Webflow: Box Model, Flexbox and Grid video

💡Key ideas

The ideas behind Webflow without writing code: structure and nesting, classes, the box model, Flexbox, Grid and CSS units, while building the Chai Corner menu.

HTML is structure, CSS is style

Every element you add is HTML. Everything you change in the Style panel is CSS. Like a house: walls and rooms vs paint and furniture.

The box model

Every element is a box with four layers: content, padding (inside), border, margin (outside).

Flexbox = one direction

A row or a column: a navigation bar, a group of buttons, a stacked hero.

Grid = two directions

Rows and columns together: a product list, a gallery, a menu. Like an egg tray.

☕
REAL-WORLD EXAMPLEA cup of chai on a table: the chai is the content, the space between the chai and the edge of the cup is padding, the cup itself is the border, and the space between your cup and the next cup is the margin.

⏱️Chapters

Click a chapter to jump to that moment in the video.

📋Step-by-step

Tick each step as you build it in your own site. Your ticks are saved.

Structure the hero

Build the menu with Grid

⚙️CSS units

UnitRelative toUse it for
pxFixed sizeSpacing, borders (beginner default)
%The parent boxWidths
remBase font size (usually 16px)Font sizes, consistent spacing
vw / vhScreen width / heightFull-screen sections
What Webflow writes for the hero
.hero {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 24px;
  padding: 80px 40px;
}
.menu-grid {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  gap: 24px;
}

⚠️Common mistakes

✕Confusing padding and margin. Padding is inside the box, margin is outside.
✕Using Grid for a simple row of buttons, or Flexbox for a photo gallery. One direction → Flex, two → Grid.
✕Vague class names like div-block-7. Use hero, menu-grid, menu-card.

🧠Recap & quiz

First the recap question from the video, then the quiz. Your best score is saved.

Recap: What is the difference between padding and margin?

Padding is the space inside the box, between the content and the border. Margin is the space outside the box, between this box and the next one.

Q1 of 4 · The owner wants a photo gallery with three photos per row and many rows. Which layout?

Rows and columns together is exactly what Grid does.

Q2 of 4 · Padding is space…

Padding sits between the content and the border.

Q3 of 4 · Which unit is relative to the parent box?

Percent is relative to the parent.

Q4 of 4 · You change the padding of one menu card and all three change. Why?

A class is a shared set of styles.
Your score 0 / 4 Answer all questions to save your score

🏠Homework

Do this on your own site before the next lesson.

Next lesson →

❓FAQ & key terms

What is a div in Webflow?

A Box element. It holds other elements so you can move and style them as one group.

Do I need HTML and CSS to use Webflow?

No, but understanding the ideas helps you design faster and fix problems in seconds.

Which unit should beginners use?

Pixels for spacing and percent for widths.

NestingBox modelFlexboxGrid

Lesson 04 of 11 · All cheat sheets · Watch on YouTube