Questions
CSS questions
Choose a question page, learn the concept, then test your understanding with a quiz.
CSS Font Scaling Relative to Container Size: %, em, rem, vw, and Responsive Text
Learn how CSS font scaling really works and how to make text responsive using %, em, rem, vw, clamp(), and media queries.
CSS Parent Selector Explained: Selecting a Parent <li> from an <a>
Learn whether CSS has a parent selector, how :has() works, and practical alternatives for styling a parent li from a child anchor.
CSS Previous Sibling Selector: What Exists and How to Work Around It
Learn whether CSS has a previous sibling selector, why it does not, and practical ways to style earlier elements using CSS alternatives.
CSS Transitions on display: Why They Don't Work and How to Fade Elements In
Learn why CSS cannot transition the display property and how to create smooth fade-in dropdown menus using opacity and visibility.
Can You Style Half of a Character in CSS? Techniques for Split Text Effects
Learn how to style half of a character in CSS using layered text, gradients, and pseudo-elements for dynamic split-letter effects.
Hide Scrollbars but Keep Scrolling in CSS
Learn how to hide scrollbars while keeping scrolling enabled using CSS, including browser-specific rules for Chrome, Firefox, and IE/Edge.
How CSS Triangles Work: Borders, Zero Size, and Shape Tricks
Learn how CSS triangles work using zero width/height and borders. Understand the visual trick with clear examples and practical uses.
How to Align Checkbox and Label Text Consistently with CSS
Learn how to align checkbox inputs and labels consistently across browsers using simple HTML and CSS patterns.
How to Change the Cursor to a Hand on Hover in HTML and CSS
Learn how to use the CSS cursor property to show a hand pointer when hovering over list items in HTML and CSS.
How to Click Through an Overlay Div in CSS and JavaScript
Learn how to click through an overlay div using CSS pointer-events, with examples, common mistakes, and real-world use cases.
How to Create a Placeholder for a Select Box in HTML and CSS
Learn how to add a placeholder-like default option to an HTML select box using valid HTML, CSS, and simple best practices.
How to Disable Text Selection Highlighting in CSS
Learn how to disable text selection highlighting with CSS using user-select, vendor prefixes, examples, pitfalls, and best practices.
How to Horizontally Center an Element in CSS
Learn how to horizontally center a div in CSS using margin auto, flexbox, and grid with beginner-friendly examples and common mistakes.
How to Make Only the Background Transparent in CSS
Learn how to make a CSS background semi-transparent without fading text or child elements using rgba(), hsla(), and modern techniques.
How to Make a Div Fill Remaining Screen Height in CSS
Learn how to make a content div fill the remaining screen height below a variable header using modern CSS layout techniques.
How to Make a div Fit Its Contents in CSS
Learn how to make a div only as wide as its content using CSS, including inline-block, fit-content, and common layout pitfalls.
How to Remove Input Focus Outline in CSS (Chrome) and Do It Accessibly
Learn how to remove or customize input focus outlines in CSS, especially in Chrome, while keeping forms accessible and usable.
How to Set Table Cell Padding and Spacing in CSS
Learn how to replace HTML table cellpadding and cellspacing with CSS using padding and border-spacing correctly.
How to Transition Height from 0 to Auto in CSS
Learn why CSS cannot transition height: auto and how to create smooth expand-collapse effects using max-height and alternatives.
How to Vertically Align an Image Inside a Div in CSS
Learn how to vertically center an image inside a div using CSS, including classic techniques, browser support, and practical examples.
Page 1 of 2 - 23 questions