Questions
CSS questions
Choose a question page, learn the concept, then test your understanding with a quiz.
How to Center an Absolutely Positioned Element in CSS
Learn how to center an absolutely positioned element in CSS, even when its width is unknown or responsive.
How to Center an Absolutely Positioned Element in CSS
Learn how to center an element with position:absolute in CSS, why margin:auto fails, and the best centering techniques with examples.
How to Change SVG Color in CSS: fill, img, image, and Inline SVG
Learn why CSS fill does not color an external SVG in HTML and how to correctly change SVG colors using inline SVG and currentColor.
How to Change the Color of an HR Element in CSS
Learn how to change the color of an HTML hr element using CSS, including border styling, modern examples, and common mistakes.
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 Combine a Background Image and CSS Gradient on the Same Element in CSS
Learn how to layer a CSS gradient and background image on one element using multiple backgrounds, with examples and common mistakes.
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 Disable a Link Using CSS
Learn what CSS can and cannot do when disabling links, plus practical patterns for inactive navigation links and accessible alternatives.
How to Handle :hover Styles Without Inline CSS in HTML and Email
Learn why `a:hover` cannot be written in inline CSS, how pseudo-classes work, and what practical alternatives exist in HTML and email.
How to Hide Number Input Spin Buttons in HTML and CSS
Learn how to hide HTML5 number input spin buttons using CSS, browser-specific rules, and practical form styling tips.
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 Inspect :hover State in Chrome DevTools
Learn how to force and inspect the :hover state in Chrome DevTools so you can debug CSS for links, buttons, and interactive elements.
How to Limit Text to N Lines in CSS with Ellipsis
Learn how to clamp text to a fixed number of lines in CSS, add ellipsis, and handle overflow with practical examples and common pitfalls.
How to Maintain the Aspect Ratio of a div with CSS
Learn how to keep a div responsive while preserving its aspect ratio using modern CSS and classic fallback techniques.
How to Make Bootstrap Columns the Same Height
Learn beginner-friendly ways to make Bootstrap columns equal height using Flexbox, table display, and practical layout patterns.
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 Fill the Browser Height in CSS
Learn how to make a div span the full browser height using CSS, including 100%, min-height, and modern viewport units.