Questions
CSS questions
Choose a question page, learn the concept, then test your understanding with a quiz.
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 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.
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 Open a Bootstrap Dropdown on Hover Instead of Click
Learn how to make a Bootstrap dropdown open on hover instead of click, remove caret arrows, and understand the tradeoffs clearly.
How to Overlay One div Over Another in CSS
Learn how to overlay one div on another using CSS positioning, absolute positioning, and centering techniques.
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 Remove Space Between inline-block Elements in CSS
Learn why inline-block elements have gaps and how to remove space between them using practical CSS techniques and examples.
How to Select the First Element With a Class in CSS
Learn why `.red:first-child` fails in CSS and how to correctly target the first matching element using selectors like `:first-of-type`.
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 Text in a div with CSS
Learn how vertical text alignment works in CSS, why `vertical-align` fails on divs, and practical ways to center content correctly.
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.
Margin vs Padding in CSS: What’s the Difference and When to Use Each
Learn the difference between margin and padding in CSS, how they affect layout and spacing, and when to use each with simple examples.
SCSS vs Sass: What’s the Difference in Sass Syntax?
Learn the difference between SCSS and Sass, how their syntax works, and when to use each for writing more powerful CSS stylesheets.
Using Sass Variables Inside CSS calc()
Learn how to use Sass variables inside CSS calc() correctly, including interpolation, examples, pitfalls, and real-world usage.
Valid CSS Class Names and Selectors: Allowed Characters in CSS
Learn which characters are valid in CSS class names and selectors, how escaping works, and how to write safe, practical CSS names.
visibility:hidden vs display:none in CSS Explained
Learn the difference between visibility:hidden and display:none in CSS, including layout behavior, examples, mistakes, and real-world usage.
Page 2 of 2 - 40 questions