zenfrontend
HomeQuestionsProblemsCompaniesBlogToolsExtensionJoin Telegram
← All Questions

CSS Interview Questions

Interview questions covering css fundamentals.

01

CSS Box Model

Understand the CSS box model: content, padding, border and margin, how box-sizing changes width and height calculations, and common layout pitfalls.

css
02

How to center a div

How to center a div using CSS. Learn four approaches: flexbox, grid, margin auto and absolute positioning, and when to choose each one in your layouts.

css
03

margin vs padding

CSS margin vs padding and the box model explained: when to use each, margin collapse, box-sizing, and a cheat sheet for buttons, cards, and layouts.

css
04

Difference between px, rem, em units

Learn the difference between px, em and rem units in CSS: how each one is calculated, how they scale, and when to use them for accessible, responsive design.

css
05

Difference between reset.css and normalize.css

Learn the difference between reset.css and normalize.css: how each handles browser default styles, their trade-offs, and which one to pick for your project.

css
06

CSS Specificity: How the Browser Picks a Winner

CSS specificity explained with diagrams: how to calculate it, why 11 classes don't beat one ID, and how !important, :is(), :where() and @layer change the rules.

css
07

z-index css

Understand CSS z-index and stacking contexts: how elements are layered, which properties create a new stacking context, and why z-index sometimes fails.

css
Zen Frontend

A comprehensive handbook for frontend interview preparation

QuestionsProblemsBlogAboutContactTerms & ConditionsGitHub

© 2026 Zen Frontend.