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.

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 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

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.

csshtmlwidth

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.

cssdrop-down-menutwitter-bootstrap

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.

csshtmlpositionoverlay

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.

cssgoogle-chromeinputfocus

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.

csshtmlflexbox

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`.

csscss-selectors

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.

csshtmlhtml-tablealignment

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.

csscss-transitions

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.

csshtmlvertical-alignment

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.

cssimagevertical-alignment

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.

csspaddingmargin

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.

csssass

Using Sass Variables Inside CSS calc()

Learn how to use Sass variables inside CSS calc() correctly, including interpolation, examples, pitfalls, and real-world usage.

csssasscss-calc

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.

csscss-selectors

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.

cssvisibility

Page 2 of 2 - 40 questions