FrontendPrep
Menu
Topics
Questions
Guides
Challenges
Soon
Topic Directory

CSS & Layouts Questions

Master your CSS & Layouts fundamentals, advanced mechanics, and ace your frontend interview challenges.

CSS & Layouts Stats
8questions loaded
5 Easy3 Medium0 Hard
Show
Sort

Showing 8 of 8 questions

CSS & LayoutsEasy

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.

CSSBox ModelLayouts+1
8 min read
View
CSS & LayoutsEasy

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.

CSSLayoutsStacking Context
5 min read
View
CSS & LayoutsEasy

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.

CSSSpecificityCascade+1
8 min read
View
CSS & LayoutsEasy

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.

CSSCustom PropertiesThemes
6 min read
View
CSS & LayoutsMedium

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.

CSSFlexboxGrid+1
6 min read
View
CSS & LayoutsEasy

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.

CSSFlexboxLayouts
7 min read
View
CSS & LayoutsMedium

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.

CSSGridLayouts
8 min read
View
CSS & LayoutsMedium

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.

CSSSelectorsLayouts
7 min read
View