CSS Box Model, Selectors and Media Queries: A Flashcard Study Guide
Master the CSS box model, positioning, Flexbox, Grid, 40+ selectors and pseudo-classes, specificity, media queries and animations with 129 real flashcards from deck UZ5568.

Studying. But it's also a video game. 🎮
Flashcards, quizzes and games that make you actually remember.
Posted by
Related reading
Learn Vue.js Core Concepts: 30 Flashcards on Reactivity, Directives and the Vue Ecosystem
Learn Vue.js with deck XT7941: 30 flashcards on directives, virtual DOM, reactivity, computed vs watch, Pinia, Vue Router and Vite, plus the cards to update.
OWASP Top 10 Flashcards: Study the 2021 List and Update It for 2025
Study OWASP Top 10 with 35 flashcards on injection, SSRF, SAST, DAST, IAST and RASP, then add the missing #1 risk and the new OWASP 2025 ranking.
Learn CSS Flexbox and Grid in German: 58 Flashcards on Hauptachse, Spuren and Zellen
Learn CSS Flexbox and Grid with German backs: 58 real flashcards on Hauptachse, Querachse, Spur and Zelle, plus the Zeile trap and three backs to fix.
CSS is easy to read and surprisingly hard to recall: you know position: absolute exists, but is it relative to the viewport or the nearest positioned ancestor? Which is stronger, an ID or ten classes? Does em follow the parent or the root? The CSS: Box Model, Selectors & Media Queries deck on Flip It (code UZ5568, 129 cards) turns those questions into flashcards so the answers arrive before you reach for MDN. Here is how to study it.
Study this deck: CSS: Box Model, Selectors & Media Queries
1 / 10CSS
Tap the card for the answer · swipe right if you knew it, left if not
Sample cards
| Front | Back |
|---|---|
| Box-sizing: border-box | Makes width and height include padding and border, not just content |
| Margin collapse | When vertical margins of adjacent block elements combine into a single margin (the larger of the two) |
| Position: absolute | Positions the element relative to its nearest positioned ancestor; removed from document flow |
| Flex: 1 | Shorthand for flex-grow: 1, flex-shrink: 1, flex-basis: 0% |
| Adjacent sibling combinator | + (e.g., h1 + p selects p immediately after h1) |
| Specificity order (from highest to lowest) | Inline styles > IDs > Classes/attributes/pseudo-classes > Elements/pseudo-elements |
| :where() | Like :is() but with zero specificity. Useful for default styles that should be easily overridden |
| em vs rem | em is relative to the parent's font-size; rem is relative to the root (html) font-size |
| Min-width in media queries | Applies styles when viewport is at or above specified width. @media (min-width: 768px) = desktop-first breakpoint |
| Animation-fill-mode | How styles are applied before/after animation: none, forwards (keep end state), backwards (apply start), both |
Everything the 129 cards cover
- Box model & layout — content/padding/border/margin,
box-sizing, margin collapse, shorthand order (top-right-bottom-left),displayblock/inline/inline-block/none vsvisibility: hidden,positionstatic/relative/absolute/fixed/sticky,z-index,overflowhidden/scroll/auto,max-width,min-height. - Flexbox & Grid —
flex-direction,justify-content,align-items,flex-wrap,flex: 1,grid-template-columns/rows, thefrunit,gap,grid-column: span 2. - Selectors — type, class, ID, universal,
[attr],[attr="value"]; descendant, child>, adjacent+, general sibling~combinators; pseudo-classes:hover,:active,:focus,:visited,:first-child,:last-child,:nth-child(n),:nth-of-type(n),:not(),:is(),:has(),:where(),:empty,:checked,:disabled,:enabled,:required,:valid/:invalid; pseudo-elements::before,::after,::first-letter,::first-line,::selection,::placeholder. - Cascade — specificity,
!important, the cascade algorithm. - Typography & color —
font-size,font-family,font-weight,text-align,text-decoration,line-height,letter-spacing,text-transform,white-space: nowrap,rgba(),opacity,bordershorthand,border-radius,box-shadow,cursor: pointer. - Units —
em,rem(1rem ≈ 16px),vh,vw. - Media queries — syntax,
max-widthvsmin-width, combining withand/commas, common breakpoints, the viewport meta tag. - Motion —
transitionshorthand and timing functions, what can and cannot be transitioned,animationshorthand,@keyframes, iteration-count, direction, fill-mode, play-state,transformtranslate/rotate/scale/skew,transform-origin,will-change.
Two tips for this deck
Turn the combinator and pseudo-class cards into a scratch file. About 40 cards are selectors. Each time one comes up, type its example (h1 ~ p, li:nth-child(odd), div:has(img)) into a CodePen with three or four elements and watch what turns red. The deck's backs already contain runnable snippets, so the cost is thirty seconds per card, and a selector you've seen match is far stickier than one you've read.
Learn the "pairs" cards together. The deck is full of near-twins that cause real bugs: display: none vs visibility: hidden, em vs rem, max-width vs min-width media queries, :nth-child vs :nth-of-type, :is() vs :where(), transition vs animation. When one twin appears in review, say the other one's answer too. That converts a confusable pair into a single, stable contrast.
Where to find it
Sign in to Flip It and open UZ5568 — CSS: Box Model, Selectors & Media Queries. At roughly 20 new cards a day the deck takes a week to seed, after which daily reviews shrink to a few minutes — cheaper than looking up flex-basis for the fifth time.
Ready to learn faster? 🚀
Join FLIP IT for free and turn studying into a game.