Questions

CSS questions

Choose a question page, learn the concept, then test your understanding with a quiz.

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

How to Work with CSS Pseudo-Elements (::before and ::after) in JavaScript

Learn how CSS pseudo-elements work, why JavaScript cannot directly select them, and practical ways to update ::before and ::after content.

cssjavascriptjqueryjquery-selectors

How to Wrap Text in a HTML pre Tag

Learn how to make text wrap inside an HTML pre tag using CSS while preserving whitespace for code and debugging output.

csshtml

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

Should CSS Come Before JavaScript in HTML? Rendering and Loading Explained

Learn when CSS should come before JavaScript in HTML, how browsers block rendering, and what ordering means for page performance.

cssjavascriptperformance

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

Vertical Alignment in Bootstrap 3: Why `vertical-align` Doesn’t Work and What to Use Instead

Learn why `vertical-align` fails in Bootstrap 3 grid columns and how to vertically align elements using reliable CSS alternatives.

csshtmltwitter-bootstraptwitter-bootstrap-3

What the CSS `~` General Sibling Selector Means

Learn what the CSS `~` selector means, how the general sibling combinator works, and when to use it with clear examples.

csscss-selectors

Why Flexbox Has No justify-self or justify-items in CSS

Learn why Flexbox does not use justify-self or justify-items, how axis alignment works, and what to use instead in real CSS layouts.

cssflexboxlanguage-lawyer

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 4 of 4 - 72 questions