MugUp logoMugUp
HomeBrowseAboutBlog
LoginSign Up
MugUp

Plan your day, study, read, write and track your habits in one app.

Follow MugUp

Product

  • Features
  • Compare
  • Free Tools
  • Deck Library
  • MugUp for Discord

Community

  • Blog
  • Changelog
  • Feature Requests
  • Deck Requests

Company

  • Home
  • About
  • Contact

© 2026 MugUp. All rights reserved.

Terms of ServicePrivacy PolicyCookie Policy
  1. Browse decks
  2. Frontend Engineering Fundamentals
  3. CSS Layout: Box Model, Flexbox and Grid
Public deck

Frontend Engineering Fundamentals

The frontend half of the engineering set: HTML semantics and accessibility, CSS layout and the cascade, JavaScript core semantics, the event loop, and React. Useful both for interviews and for day-to-day work.

Engineering
AShared by Alex Chen
1Sign in to add this deckTry itSign in to clone

Add it to your projects to study it here with your progress saved. Try it plays a round and saves nothing. Clone makes your own copy that you can change.

You’re reading a free preview. Sign up to see every topic and question — and to play this deck as games.

See the whole deck

CSS Layout: Box Model, Flexbox and Grid

How boxes are sized and placed, and choosing between one-dimensional flex and two-dimensional grid.

Try this topicBack to deck

Content

37 total questions

MCQ: 9
Fill-in: 7
Flashcards: 12
Pair match: 9
CSS Layout: Box Model, Flexbox and Grid – Flashcards
Flashcards

Card #1

What is the CSS box model, from the inside out?

Card #2

What does box-sizing: border-box change?

Card #3

What is margin collapsing?

9 more questions in this game

Showing 3 of 12. Sign up free to see the rest.

Sign up freeLog in
CSS Layout: Box Model, Flexbox and Grid – MCQ
Multiple Choice Questions
  1. 1. A grid uses repeat(auto-fit, minmax(150px, 1fr)) and holds only two items in a wide container. What happens?

    • The empty tracks collapse, so the two items stretch to fill the row
    • Empty tracks are kept, so the two items stay at their minimum size
    • The grid switches to a single column until more items are added
    • The two items overflow because auto-fit ignores the 1fr maximum
  2. 2. A flex item holding a long unbroken URL overflows its row instead of shrinking. What usually fixes it?

    • Setting flex-grow: 0 on the item
    • Setting min-width: 0 on the item
    • Setting flex-basis: 100% on the row
    • Setting align-items: stretch on the row
  3. 3. An element has position: sticky; top: 0 but never sticks. What is a common cause?

    • The element itself has a z-index lower than its siblings
    • The element sits inside a parent that has a background colour
    • An ancestor between it and the page has overflow: hidden
    • The page does not set a height on the html element
6 more questions in this game

Showing 3 of 9. Sign up free to see the rest.

Sign up freeLog in
CSS Layout: Box Model, Flexbox and Grid – Fill-in-the-blank
Fill in the Blank
  1. 1. display: ___ creates a new block formatting context, so a parent grows to contain its floated children.

    Answer:flow-rootalso: flow root

    Hint: Two words joined by a hyphen

  2. 2. place-items: center sets both align-items and ___ to center.

    Answer:justify-items

    Hint: The other alignment axis

  3. 3. The shorthand ___: 0 sets top, right, bottom and left to zero in one declaration.

    Answer:inset

    Hint: Five letters

4 more questions in this game

Showing 3 of 7. Sign up free to see the rest.

Sign up freeLog in
CSS Layout: Box Model, Flexbox and Grid – Pair match
Pair Match
grid-template-areas↔Lays out the grid by naming regions in strings
grid-auto-rows↔Size of rows the grid creates on its own
grid-auto-flow: dense↔Fills earlier gaps with later, smaller items
6 more questions in this game

Showing 3 of 9. Sign up free to see the rest.

Sign up freeLog in