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.

csscss-positionabsolute

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.

csshtmlcss-positioncentering

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.

csssvgcolors

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.

csshtml

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.

csshovermouse-cursor

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.

cssclickmouseeventlayer

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.

cssbackground-imagegradient

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.

csshtmlhtml-selectplaceholder

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.

csscross-browserhighlighttextselection

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.

csshtml

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.

csshtmlinline-styles

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.

csshtmlinputnumbers

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.

csshtmlalignmentcentering

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.

cssgoogle-chromebrowserhover

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.

csstextoverflowellipsis

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.

csshtmlresponsive-designaspect-ratio

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.

csstwitter-bootstrap

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.

csshtmlopacity

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.

csshtmlhtml-table

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.

csshtmlheight

Page 2 of 4 - 72 questions