MugUp logoMugUp
HomeBrowsePricingAboutBlogContact
LoginSign Up
© 2026 MugUp. All rights reserved.
HomeAboutDeck LibraryBlogChangelogContactFeature RequestsDeck Requests
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
1PlaySign in to clone

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.

Play 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. With box-sizing: content-box, an element has width: 200px, padding: 20px and a 2px border. How wide is its border box?

    • 244px
    • 200px
    • 222px
    • 240px
  2. 2. In a flex container with flex-direction: row, align-items aligns items along:

    • The cross axis, which is vertical here
    • The main axis, which is vertical here
    • Both axes at once
    • The inline axis of each item's text
  3. 3. flex: 1 is shorthand for which three values?

    • flex-grow: 1, flex-shrink: 1, flex-basis: 0%
    • flex-grow: 1, flex-shrink: 0, flex-basis: auto
    • flex-grow: 1, flex-shrink: 1, flex-basis: auto
    • flex-grow: 0, flex-shrink: 1, flex-basis: 1px
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. Setting box-sizing to ___ makes the declared width include padding and border.

    Answer:border-boxalso: borderbox, border box

    Hint: The opposite of content-box.

  2. 2. In a row-direction flex container, justify-content aligns items along the ___ axis.

    Answer:main

    Hint: The other one is the cross axis.

  3. 3. The shorthand flex: 1 expands to grow 1, shrink 1 and a flex-basis of ___.

    Answer:0%also: 0, zero

    Hint: Not auto.

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
justify-content↔Distributes items along the main axis
align-items↔Aligns items on the cross axis
flex-basis↔An item's starting size before growing or shrinking
6 more questions in this game

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

Sign up freeLog in