CSS & Layouts Questions
Master your CSS & Layouts fundamentals, advanced mechanics, and ace your frontend interview challenges.
Showing 8 of 8 questions
CSS Box Model: content-box vs. border-box
Master the CSS Box Model. Learn the differences between content-box and border-box, margin collapsing, block vs. inline layouts, and modern layout sizing calculations.
CSS Positioning: Static, Relative, Absolute, Fixed, and Sticky
Master CSS positioning models. Learn how static, relative, absolute, fixed, and sticky work, how they impact the normal document flow, and how stacking contexts are formed.
CSS Specificity: How Styles Are Applied
Master CSS Specificity rules. Learn how the browser calculates specificity scores, inline styles, !important, and how cascade rules determine which styles win.
CSS: Custom Properties (CSS Variables) vs. Sass/Less Variables
Understand runtime CSS Custom Properties, scope cascading, JS integration for dynamic themes, and why they outshine preprocessor compilation variables.
Flexbox vs. CSS Grid: Key Differences and Best Practices
Understand when to use Flexbox (1D) vs. CSS Grid (2D) for modern web layouts. Learn their differences, content-first vs. layout-first design, alignment properties, and key interview scenarios.
CSS Flexbox: Layout Guide and Practice
Master CSS Flexbox. Learn about main and cross axes, flex container and item properties (grow, shrink, basis), alignment, and real-world UI design solutions.
CSS Grid: Layout Guide and Practice
Master CSS Grid. Learn about grid templates, lines, areas, auto-fit/auto-fill, track sizing with fr units, and building complex two-dimensional layouts.
CSS: Modern :has() Selector and Pseudo-classes vs. Pseudo-elements
Master pseudo-classes, pseudo-elements, and the modern native parent selector ':has()' to create complex relational styling rules without JavaScript.