Box Model CSS Interview Questions
12 curated box model interview questions for CSS — with short answers, detailed explanations, and interview tips. Ideal for Fresh through Tech Lead prep.
Explain content-box vs border-box.
Fresh / InternComparison
How do margin, padding, and border differ?
Fresh / InternConcept
What is margin collapse?
JuniorConcept
What is a Block Formatting Context (BFC)?
JuniorConcept
How do width percentage and padding interact?
JuniorDebugging
min-width/max-width vs width — when?
Mid-LevelBest Practice
What does box-sizing inherit reset look like and trade-offs?
Mid-LevelLive Coding
How do outlines differ from borders?
Mid-LevelComparison
Explain overflow, scroll containers, and sticky pitfalls.
SeniorDebugging
What is the visual viewport vs layout viewport conceptually?
SeniorConcept
How do you center a box horizontally and vertically (classic)?
SeniorLive Coding
Architect spacing tokens with the box model in mind.
Tech LeadArchitecture